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.TypePrettyPrinterprintAnnotations(boolean printAnnotations)Whether to print the type annotations.TypePrettyPrint.TypePrettyPrinterprintMethodHeader(boolean printMethodHeader)Print the declaring type of the method and its type parameters.TypePrettyPrint.TypePrettyPrinterprintMethodResult(boolean printMethodResult)Print the return type of methods (as postfix).voidprintTypeVarBounds(net.sourceforge.pmd.util.OptionalBool printTypeVarBounds)Print the bounds of type variables.TypePrettyPrint.TypePrettyPrinterqualifyAnnotations(boolean qualifyAnnotations)Whether to print the binary name of a type annotation or just the simple name if false.TypePrettyPrint.TypePrettyPrinterqualifyNames(boolean qualifyNames)Use qualified names for class types instead of simple names.TypePrettyPrint.TypePrettyPrinterqualifyTvars(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(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. EgFoo#Tforclass 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.
-
-