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>
  • Method Details

    • getCode

      public String getCode()
    • apply

      public <J2 extends org.openrewrite.java.tree.J> J2 apply(org.openrewrite.Cursor scope, JavaCoordinates coordinates, Object... parameters)
      Specified by:
      apply in interface org.openrewrite.template.SourceTemplate<org.openrewrite.java.tree.J,JavaCoordinates>
    • 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

      @Incubating(since="7.38.0") public JavaTemplate.Matcher matcher(org.openrewrite.Cursor cursor)
    • apply

      public static <J2 extends org.openrewrite.java.tree.J> J2 apply(String template, org.openrewrite.Cursor scope, JavaCoordinates coordinates, Object... parameters)
    • builder

      public static JavaTemplate.Builder builder(String code)