Class ChainStringBuilderAppendCalls

java.lang.Object
org.openrewrite.Recipe
org.openrewrite.java.cleanup.ChainStringBuilderAppendCalls
All Implemented Interfaces:
Cloneable

public class ChainStringBuilderAppendCalls extends org.openrewrite.Recipe
  • Constructor Details

    • ChainStringBuilderAppendCalls

      public ChainStringBuilderAppendCalls()
  • Method Details

    • getDisplayName

      public String getDisplayName()
      Specified by:
      getDisplayName in class org.openrewrite.Recipe
    • getDescription

      public String getDescription()
      Overrides:
      getDescription in class org.openrewrite.Recipe
    • getEstimatedEffortPerOccurrence

      @Nullable public @Nullable Duration getEstimatedEffortPerOccurrence()
      Overrides:
      getEstimatedEffortPerOccurrence in class org.openrewrite.Recipe
    • getSingleSourceApplicableTest

      @Nullable protected @Nullable org.openrewrite.TreeVisitor<?,org.openrewrite.ExecutionContext> getSingleSourceApplicableTest()
      Overrides:
      getSingleSourceApplicableTest in class org.openrewrite.Recipe
    • getVisitor

      protected org.openrewrite.TreeVisitor<?,org.openrewrite.ExecutionContext> getVisitor()
      Overrides:
      getVisitor in class org.openrewrite.Recipe
    • concatAdditionBinary

      public static J.Binary concatAdditionBinary(Expression left, Expression right)
      Concat two literals to an expression with '+' and surrounded with single space.
    • additiveExpression

      public static Expression additiveExpression(Expression... expressions)
      Concat expressions to an expression with '+' connected.
    • additiveExpression

      public static Expression additiveExpression(List<Expression> expressions)
    • getAdditiveBinaryTemplate

      public static J.Binary getAdditiveBinaryTemplate()
    • flatAdditiveExpressions

      public static boolean flatAdditiveExpressions(Expression expression, List<Expression> expressionList)