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
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected abstract String
     
    protected abstract org.openrewrite.TreeVisitor<?,org.openrewrite.ExecutionContext>
     
    org.openrewrite.TreeVisitor<?,org.openrewrite.ExecutionContext>
     
    protected abstract boolean
    isFormatCall(org.openrewrite.java.tree.J.MethodInvocation call)
     
    protected abstract boolean
     
    protected abstract boolean
    validateArgumentCount(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

    Methods inherited from class java.lang.Object

    finalize, getClass, notify, notifyAll, toString, wait, wait, wait
  • 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

      protected abstract boolean isValidFormatString(String format)
    • validateArgumentCount

      protected abstract boolean validateArgumentCount(String format, List<org.openrewrite.java.tree.Expression> formatArgs)
    • convertToSlf4jTemplate

      protected abstract String convertToSlf4jTemplate(String format)
    • getVisitor

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