Class Substitutions

java.lang.Object
org.openrewrite.java.internal.template.Substitutions

public class Substitutions extends Object
  • Constructor Details

    • Substitutions

      public Substitutions()
  • Method Details

    • substitute

      public String substitute()
    • newObjectParameter

      protected String newObjectParameter(String fqn, int index)
    • newPrimitiveParameter

      protected String newPrimitiveParameter(String fqn, int index)
    • unsubstitute

      public <J2 extends org.openrewrite.java.tree.J> List<J2> unsubstitute(List<J2> js)
    • resolveTypeVariables

      public <J2 extends org.openrewrite.java.tree.J> @Nullable J2 resolveTypeVariables(J2 j)
      Resolve generic type variable identifiers in the template AST to their erasure. E.g., an identifier "T" with type GenericTypeVariable("T") becomes "Object" when T is unbounded, or the first bound's simple name when bounded.
    • unsubstitute

      public <J2 extends org.openrewrite.java.tree.J> @Nullable J2 unsubstitute(J2 j)