Package org.openrewrite.staticanalysis
Class ChainStringBuilderAppendCalls
java.lang.Object
org.openrewrite.Recipe
org.openrewrite.staticanalysis.ChainStringBuilderAppendCalls
- All Implemented Interfaces:
Cloneable
public class ChainStringBuilderAppendCalls
extends org.openrewrite.Recipe
-
Field Summary
Fields inherited from class org.openrewrite.Recipe
contributors, examples, NOOP, PANIC -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic @Nullable org.openrewrite.java.tree.ExpressionadditiveExpression(List<org.openrewrite.java.tree.Expression> expressions) static @Nullable org.openrewrite.java.tree.ExpressionadditiveExpression(org.openrewrite.java.tree.Expression... expressions) Concat expressions to an expression with '+' connected.static org.openrewrite.java.tree.J.BinaryconcatAdditionBinary(org.openrewrite.java.tree.Expression left, org.openrewrite.java.tree.Expression right) Concat two literals to an expression with '+' and surrounded with single space.static booleanflatAdditiveExpressions(org.openrewrite.java.tree.Expression expression, List<org.openrewrite.java.tree.Expression> expressionList) static org.openrewrite.java.tree.J.Binary@Nullable Durationorg.openrewrite.TreeVisitor<?,org.openrewrite.ExecutionContext> Methods inherited from class org.openrewrite.Recipe
addDataTable, causesAnotherCycle, clone, createRecipeDescriptor, equals, getContributors, getDataTableDescriptors, getDescriptor, getExamples, getJacksonPolymorphicTypeTag, getMaintainers, getName, getRecipeList, getTags, hashCode, maxCycles, noop, run, run, run, setContributors, setExamples, validate, validate, validateAll
-
Constructor Details
-
ChainStringBuilderAppendCalls
public ChainStringBuilderAppendCalls()
-
-
Method Details
-
getDisplayName
- Specified by:
getDisplayNamein classorg.openrewrite.Recipe
-
getDescription
- Specified by:
getDescriptionin classorg.openrewrite.Recipe
-
getEstimatedEffortPerOccurrence
- Overrides:
getEstimatedEffortPerOccurrencein classorg.openrewrite.Recipe
-
getVisitor
public org.openrewrite.TreeVisitor<?,org.openrewrite.ExecutionContext> getVisitor()- Overrides:
getVisitorin classorg.openrewrite.Recipe
-
concatAdditionBinary
public static org.openrewrite.java.tree.J.Binary concatAdditionBinary(org.openrewrite.java.tree.Expression left, org.openrewrite.java.tree.Expression right) Concat two literals to an expression with '+' and surrounded with single space. -
additiveExpression
@Nullable public static @Nullable org.openrewrite.java.tree.Expression additiveExpression(org.openrewrite.java.tree.Expression... expressions) Concat expressions to an expression with '+' connected. -
additiveExpression
@Nullable public static @Nullable org.openrewrite.java.tree.Expression additiveExpression(List<org.openrewrite.java.tree.Expression> expressions) -
getAdditiveBinaryTemplate
public static org.openrewrite.java.tree.J.Binary getAdditiveBinaryTemplate() -
flatAdditiveExpressions
public static boolean flatAdditiveExpressions(org.openrewrite.java.tree.Expression expression, List<org.openrewrite.java.tree.Expression> expressionList)
-