Package org.openrewrite.java
Class JavaTemplate
java.lang.Object
org.openrewrite.java.JavaTemplate
- All Implemented Interfaces:
org.openrewrite.template.SourceTemplate<org.openrewrite.java.tree.J,JavaCoordinates>
public class JavaTemplate
extends Object
implements org.openrewrite.template.SourceTemplate<org.openrewrite.java.tree.J,JavaCoordinates>
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedJavaTemplate(String code, Set<String> genericTypes, Consumer<String> onAfterVariableSubstitution, JavaTemplateParser templateParser) -
Method Summary
Modifier and TypeMethodDescriptionstatic <J2 extends org.openrewrite.java.tree.J>
J2apply(String template, org.openrewrite.Cursor scope, JavaCoordinates coordinates, Object... parameters) <J2 extends org.openrewrite.java.tree.J>
J2apply(org.openrewrite.Cursor scope, JavaCoordinates coordinates, Object... parameters) static JavaTemplate.Builderprotected static Pathmatcher(org.openrewrite.Cursor cursor) static booleanbooleanmatches(org.openrewrite.Cursor cursor) protected Substitutionssubstitutions(Object[] parameters)
-
Constructor Details
-
JavaTemplate
-
-
Method Details
-
getTemplateClasspathDir
-
apply
public <J2 extends org.openrewrite.java.tree.J> J2 apply(org.openrewrite.Cursor scope, JavaCoordinates coordinates, Object... parameters) - Specified by:
applyin interfaceorg.openrewrite.template.SourceTemplate<org.openrewrite.java.tree.J,JavaCoordinates>
-
substitutions
-
matches
@Incubating(since="8.0.0") public static boolean matches(String template, org.openrewrite.Cursor cursor) -
matches
@Incubating(since="7.38.0") public boolean matches(org.openrewrite.Cursor cursor) -
matcher
-
apply
public static <J2 extends org.openrewrite.java.tree.J> J2 apply(String template, org.openrewrite.Cursor scope, JavaCoordinates coordinates, Object... parameters) -
builder
-