Class TypePrettyPrint.TypePrettyPrinter
java.lang.Object
net.sourceforge.pmd.lang.java.types.TypePrettyPrint.TypePrettyPrinter
- Enclosing class:
TypePrettyPrint
Options to pretty print a type. Cannot be used concurrently.
-
Constructor Summary
ConstructorsConstructorDescriptionCreate a new pretty printer with the default configuration. -
Method Summary
Modifier and TypeMethodDescriptionprintAnnotations(boolean printAnnotations) Whether to print the type annotations.printMethodHeader(boolean printMethodHeader) Print the declaring type of the method and its type parameters.printMethodResult(boolean printMethodResult) Print the return type of methods (as postfix).voidprintTypeVarBounds(net.sourceforge.pmd.util.OptionalBool printTypeVarBounds) Print the bounds of type variables.qualifyAnnotations(boolean qualifyAnnotations) Whether to print the binary name of a type annotation or just the simple name if false.qualifyNames(boolean qualifyNames) Use qualified names for class types instead of simple names.qualifyTvars(boolean qualifyTvars) Qualify type variables with the name of the declaring symbol.
-
Constructor Details
-
TypePrettyPrinter
public TypePrettyPrinter()Create a new pretty printer with the default configuration.
-
-
Method Details
-
printMethodHeader
Print the declaring type of the method and its type parameters. Default: true. -
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
Qualify type variables with the name of the declaring symbol. EgFoo#Tforclass Foo<T>}. Default: false. -
qualifyAnnotations
Whether to print the binary name of a type annotation or just the simple name if false. Default: false. -
printAnnotations
Whether to print the type annotations. Default: true. -
qualifyNames
Use qualified names for class types instead of simple names. Default: true.
-