← All recipes
Open source

Find symbols

Recipe IDorg.openrewrite.java.search.FindSymbols
Artifactorg.openrewrite:rewrite-java

Lists all symbols (classes, methods, fields, etc.) declared in the codebase. Results are emitted into a data table with symbol kind, name, parent type, signature, and visibility.

Single recipeApache 2.0

Usage

This recipe has no required configuration options. You’ll need the Moderne CLI configured before running the command below.

mod run . --recipe org.openrewrite.java.search.FindSymbols

If the recipe isn’t available locally, install it with:

mod config recipes jar install org.openrewrite:rewrite-java:8.88.0

Options

NameTypeDescription
sourcePathStringOptional source path to limit the search to a single file.
e.g. src/main/java/com/example/MyClass.java

Data tables

Structured output this recipe can produce.

  • Symbols overviewAll symbols (classes, methods, fields) declared in the codebase.org.openrewrite.java.table.SymbolsTable
  • Source files that had resultsSource files that were modified by the recipe run.org.openrewrite.table.SourcesFileResults
  • Source files that had search resultsSearch results that were found during the recipe run.org.openrewrite.table.SearchResults
  • Source files that errored on a recipeThe details of all errors produced by a recipe run.org.openrewrite.table.SourcesFileErrors
  • Recipe performanceStatistics used in analyzing the performance of recipes.org.openrewrite.table.RecipeRunStats