Class MessageFormatToParameterizedLogging
java.lang.Object
org.openrewrite.Recipe
org.openrewrite.java.logging.slf4j.AbstractFormatToParameterizedLogging
org.openrewrite.java.logging.slf4j.MessageFormatToParameterizedLogging
- All Implemented Interfaces:
Cloneable
-
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 StringconvertToSlf4jTemplate(String pattern) protected org.openrewrite.TreeVisitor<?, org.openrewrite.ExecutionContext> protected booleanisFormatCall(org.openrewrite.java.tree.J.MethodInvocation call) protected booleanisValidFormatString(String pattern) protected booleanvalidateArgumentCount(String pattern, List<org.openrewrite.java.tree.Expression> formatArgs) Methods inherited from class org.openrewrite.java.logging.slf4j.AbstractFormatToParameterizedLogging
getVisitorMethods 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
-
MessageFormatToParameterizedLogging
public MessageFormatToParameterizedLogging()
-
-
Method Details
-
getFormatPrecondition
protected org.openrewrite.TreeVisitor<?,org.openrewrite.ExecutionContext> getFormatPrecondition()- Specified by:
getFormatPreconditionin classAbstractFormatToParameterizedLogging
-
isFormatCall
protected boolean isFormatCall(org.openrewrite.java.tree.J.MethodInvocation call) - Specified by:
isFormatCallin classAbstractFormatToParameterizedLogging
-
isValidFormatString
- Specified by:
isValidFormatStringin classAbstractFormatToParameterizedLogging
-
validateArgumentCount
protected boolean validateArgumentCount(String pattern, List<org.openrewrite.java.tree.Expression> formatArgs) - Specified by:
validateArgumentCountin classAbstractFormatToParameterizedLogging
-
convertToSlf4jTemplate
- Specified by:
convertToSlf4jTemplatein classAbstractFormatToParameterizedLogging
-