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 Summary
Constructors Constructor Description TypePrettyPrinter()
Create a new pretty printer with the default configuration.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TypePrettyPrint.TypePrettyPrinter
printAnnotations(boolean printAnnotations)
Whether to print the type annotations.TypePrettyPrint.TypePrettyPrinter
printMethodHeader(boolean printMethodHeader)
Print the declaring type of the method and its type parameters.TypePrettyPrint.TypePrettyPrinter
printMethodResult(boolean printMethodResult)
Print the return type of methods (as postfix).void
printTypeVarBounds(OptionalBool printTypeVarBounds)
Print the bounds of type variables.TypePrettyPrint.TypePrettyPrinter
qualifyAnnotations(boolean qualifyAnnotations)
Whether to print the binary name of a type annotation or just the simple name if false.TypePrettyPrint.TypePrettyPrinter
qualifyNames(boolean qualifyNames)
Use qualified names for class types instead of simple names.TypePrettyPrint.TypePrettyPrinter
qualifyTvars(boolean qualifyTvars)
Qualify type variables with the name of the declaring symbol.
-
-
-
Method Detail
-
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(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. EgFoo#T
forclass 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.
-
-