Package org.openrewrite.java
@NullMarked
@NonNullFields
package org.openrewrite.java
-
ClassDescriptionThis recipe adds a comment to a method in a Java source file.AddImport<P>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 patternA recipe that will rename a package name in package statements, imports, and fully-qualified types (see: NOTE).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.ExtractField<P>This iso(morphic) refactoring visitor is the appropriate base class for most Java refactoring visitors.JavaPrinter<P>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.JavaVisitor<P>This class accepts an AspectJ method pattern and is used to identify methods that match the expression.Puts a search result marker on a JavaSourceFile if there is no missing type information according to FindMissingTypes.This recipe will group and order the imports for a compilation unit using the rules defined by an
ImportLayoutStyle.RemoveImport<P>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.A visitor to print a tree visiting order and hierarchy in format like below.