Class AbstractFormatToParameterizedLogging
java.lang.Object
org.openrewrite.Recipe
org.openrewrite.java.logging.slf4j.AbstractFormatToParameterizedLogging
- All Implemented Interfaces:
Cloneable
- Direct Known Subclasses:
MessageFormatToParameterizedLogging,StringFormatToParameterizedLogging
public abstract class AbstractFormatToParameterizedLogging
extends org.openrewrite.Recipe
-
Nested Class Summary
Nested classes/interfaces inherited from class org.openrewrite.Recipe
org.openrewrite.Recipe.Builder, org.openrewrite.Recipe.DelegatingRecipe -
Field Summary
Fields inherited from class org.openrewrite.Recipe
contributors, examples, PANIC -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract StringconvertToSlf4jTemplate(String format) protected abstract org.openrewrite.TreeVisitor<?, org.openrewrite.ExecutionContext> org.openrewrite.TreeVisitor<?, org.openrewrite.ExecutionContext> protected abstract booleanisFormatCall(org.openrewrite.java.tree.J.MethodInvocation call) protected abstract booleanisValidFormatString(String format) protected abstract booleanvalidateArgumentCount(String format, List<org.openrewrite.java.tree.Expression> formatArgs) Methods inherited from class org.openrewrite.Recipe
addDataTable, builder, buildRecipeList, causesAnotherCycle, clone, createRecipeDescriptor, equals, getContributors, getDataTableDescriptors, getDescription, getDescriptor, getDisplayName, getEstimatedEffortPerOccurrence, getExamples, getInstanceName, getInstanceNameSuffix, getJacksonPolymorphicTypeTag, getMaintainers, getName, getRecipeList, getTags, hashCode, maxCycles, noop, onComplete, run, run, run, setContributors, setExamples, validate, validate, validateAll, validateAll, withOptions
-
Constructor Details
-
AbstractFormatToParameterizedLogging
public AbstractFormatToParameterizedLogging()
-
-
Method Details
-
getFormatPrecondition
protected abstract org.openrewrite.TreeVisitor<?,org.openrewrite.ExecutionContext> getFormatPrecondition() -
isFormatCall
protected abstract boolean isFormatCall(org.openrewrite.java.tree.J.MethodInvocation call) -
isValidFormatString
-
validateArgumentCount
-
convertToSlf4jTemplate
-
getVisitor
public org.openrewrite.TreeVisitor<?,org.openrewrite.ExecutionContext> getVisitor()- Overrides:
getVisitorin classorg.openrewrite.Recipe
-