Class TypePrettyPrint.TypePrettyPrinter

java.lang.Object
net.sourceforge.pmd.lang.java.types.TypePrettyPrint.TypePrettyPrinter
Enclosing class:
TypePrettyPrint

public static class TypePrettyPrint.TypePrettyPrinter extends Object
Options to pretty print a type. Cannot be used concurrently.
  • Constructor Details

    • TypePrettyPrinter

      public TypePrettyPrinter()
      Create a new pretty printer with the default configuration.
  • Method Details

    • printMethodHeader

      public TypePrettyPrint.TypePrettyPrinter printMethodHeader(boolean printMethodHeader)
      Print the declaring type of the method and its type parameters. Default: true.
    • printMethodResult

      public TypePrettyPrint.TypePrettyPrinter printMethodResult(boolean printMethodResult)
      Print the return type of methods (as postfix). Default: true.
    • printTypeVarBounds

      public void printTypeVarBounds(net.sourceforge.pmd.util.OptionalBool printTypeVarBounds)
      Print the bounds of type variables. Default: false.
    • qualifyTvars

      public TypePrettyPrint.TypePrettyPrinter qualifyTvars(boolean qualifyTvars)
      Qualify type variables with the name of the declaring symbol. Eg Foo#T for class Foo<T>}. Default: false.
    • qualifyAnnotations

      public TypePrettyPrint.TypePrettyPrinter qualifyAnnotations(boolean qualifyAnnotations)
      Whether to print the binary name of a type annotation or just the simple name if false. Default: false.
    • printAnnotations

      public TypePrettyPrint.TypePrettyPrinter printAnnotations(boolean printAnnotations)
      Whether to print the type annotations. Default: true.
    • qualifyNames

      public TypePrettyPrint.TypePrettyPrinter qualifyNames(boolean qualifyNames)
      Use qualified names for class types instead of simple names. Default: true.