All Classes and Interfaces

Class
Description
 
This recipe adds a comment to method declarations in a Java source file.
 
A Java refactoring visitor that can be used to add an import (or static import) to a given compilation unit.
 
This recipe finds method invocations matching a method pattern and uses a zero-based argument index to determine which argument is added with a literal value.
 
This recipe finds method invocations matching a method pattern and uses a zero-based argument index to determine which argument is added with a null value.
 
 
 
This matcher will find all annotations matching the annotation pattern
 
 
 
 
 
 
 
 
 
 
 
 
 
This class provides an empty implementation of AnnotationSignatureParserListener, which can be extended to create a listener which only needs to handle a subset of the available methods.
This class provides an empty implementation of AnnotationSignatureParserVisitor, which can be extended to create a visitor which only needs to handle a subset of the available methods.
This interface defines a complete listener for a parse tree produced by AnnotationSignatureParser.
This interface defines a complete generic visitor for a parse tree produced by AnnotationSignatureParser.
 
 
 
 
 
 
 
 
 
 
 
 
 
Generates a stub containing enough variable, method, and class scope for the insertion of a statement in any block scope.
 
 
 
 
 
 
 
 
 
A recipe that will rename a package name in package statements, imports, and fully-qualified types (see: NOTE).
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Java 14 introduced compact constructors, which does not include the `()` for parameters.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Even though statements are not a superset of expressions, this provides a way for statements that are also expressions to have a generic coordinate.
 
 
 
 
 
 
 
Representation of a group, possibly with a parameter (depth for SAME_PACKAGE).
 
 
 
 
 
This recipe finds method invocations matching a method pattern and uses a zero-based argument index to determine which argument is removed.
Deletes standalone statements.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Finds fields that have a matching type.
 
 
 
 
 
Finds matching method invocations.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
A Java Style to define how imports are grouped and ordered.
A block represents a grouping of imports based on matching rules.
 
A specialized block implementation to act as a blank line separator between import groupings.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Holds line break plus the margin that starts the next line.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
This iso(morphic) refactoring visitor is the appropriate base class for most Java refactoring visitors.
 
 
 
 
 
 
 
Type mapping from type attribution given from java.lang.reflect types.
 
 
 
 
 
 
 
 
 
 
 
Not so much an extension as the FOUNDATION of templating for the Java family of languages.
Each language that extends J should provide a template extension that helps JavaTemplate build the telescoping name scope around the coordinate.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
In addition to the signature formats described below, implementations should provide a way of retrieving method and variable signatures, but they may have different numbers of input arguments depending on the implementation.
 
Rewrite's JavaParser is reliant on java's compiler internal classes that are now encapsulated within Java's module system.
 
 
 
 
AST elements that contain lists of trees with some delimiter like parentheses, e.g.
 
 
A Java element that could have space preceding some delimiter.
 
A Java element that could have trailing space.
 
JavaDoc tags like @return that may be written with a leading brace.
 
A literal in Java is either a J.Literal or a J.NewArray that has a non-null initializer that, itself, contains literals or new arrays that recursively contain these constraints.
 
 
 
Acts as a sort of bloom filter for the presence of an import for a particular type in a J.CompilationUnit, i.e.
 
 
Either a J.MethodInvocation or a J.MemberReference or a J.NewClass.
 
 
 
This class accepts an AspectJ method pattern and is used to identify methods that match the expression.
 
 
 
A tree representing a simple or fully qualified name
 
Puts a search result marker on a JavaSourceFile if there is no missing type information according to FindMissingTypes.
Ensures that whitespace is on the outermost AST element possible.
Ensures that whitespace is on the outermost AST element possible.
 
 
 
 
 
 
 
 
 
 
 
 
This recipe will group and order the imports for a compilation unit using the rules defined by an ImportLayoutStyle.
 
 
Visitor that adds parentheses to Java expressions where needed based on operator precedence and context to ensure correct evaluation order and readability.
 
Represents escaped identifiers.
 
 
 
 
 
 
 
 
 
This visitor removes method calls matching some criteria.
 
 
 
This recipe will remove any imports for types that are not referenced within the compilation unit.
 
Renames a NamedVariable to the target name.
This recipe finds method invocations matching the given method pattern and reorders the arguments based on the ordered array of parameter names.
 
 
 
 
 
 
 
 
As of 6.1.0, we are using TypeTable to include JavaParser dependencies as resources in the classpath, because including the whole JAR caused bloat in the size of recipe JARs and would often get blocked by security scanners that weren't able to recognize that these JAR resources were only used to parse templats and never executed and so didn't represent a security threat.
Recursively checks the equality of each element of two ASTs to determine if two trees are semantically equal.
 
Represents optional semi-colons on java like languages.
Less commonly used than AutoFormat, but useful in cases when a block of code is being moved definitively a certain number of indentation levels left or right, such as when unwrapping a block or conditional statement.
 
 
 
 
 
Service for computing source code position metrics such as column alignment positions and tree element lengths.
Wherever whitespace can occur in Java, so can comments (at least block and javadoc style comments).
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
This class provides an empty implementation of TemplateParameterParserListener, which can be extended to create a listener which only needs to handle a subset of the available methods.
This class provides an empty implementation of TemplateParameterParserVisitor, which can be extended to create a visitor which only needs to handle a subset of the available methods.
This interface defines a complete listener for a parse tree produced by TemplateParameterParser.
This interface defines a complete generic visitor for a parse tree produced by TemplateParameterParser.
 
 
 
 
 
Deprecated.
A visitor to print a tree visiting order and hierarchy in format like below.
 
 
A tree with type attribution information.
 
 
 
 
 
 
 
Type tables are written as a TSV file with the following columns: groupId artifactId version classAccess className classSignature classSuperclassSignature classSuperinterfaceSignatures[] access memberName descriptor signature parameterNames exceptions[] elementAnnotations parameterAnnotations[] typeAnnotations[] constantValue
Reads a type table from the classpath, and writes classes directories to disk for matching artifact names.
Options for controlling how type tables are read.
Enhanced builder with convenience methods.
 
A tree identifying a type (e.g.
 
 
 
 
 
 
 
 
 
 
Marks a JavaSourceFile as matching if all the passed methods are found.
 
 
 
 
 
 
 
 
A variable declarator is a variable name(s).