All Classes and Interfaces
Class
Description
A Java refactoring visitor that can be used to add an import (or static import) to a given compilation unit.
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.
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.
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.
This class provides an empty implementation of
MethodSignatureParserListener
,
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
MethodSignatureParserVisitor
,
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
MethodSignatureParser
.This interface defines a complete generic visitor for a parse tree produced
by
MethodSignatureParser
.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
.Deprecated.
Represents escaped identifiers.
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.
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.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
.A visitor to print a tree visiting order and hierarchy in format like below.
A tree with type attribution information.
A tree identifying a type (e.g.
Marks a
JavaSourceFile
as matching if all the passed methods are found.