Package spoon.reflect.visitor
Enum ElementPrinterHelper.PrintTypeArguments
java.lang.Object
java.lang.Enum<ElementPrinterHelper.PrintTypeArguments>
spoon.reflect.visitor.ElementPrinterHelper.PrintTypeArguments
- All Implemented Interfaces:
Serializable
,Comparable<ElementPrinterHelper.PrintTypeArguments>
- Enclosing class:
- ElementPrinterHelper
public static enum ElementPrinterHelper.PrintTypeArguments
extends Enum<ElementPrinterHelper.PrintTypeArguments>
Whether to print generic types for references. This affects e.g. explicit type arguments for constructor
or method calls.
A diamond operator is only valid in some places. This enum controls whether they can and should be printed at
a given location.
-
Enum Constant Summary
Enum ConstantDescriptionPrint explicit type arguments, but also print a diamond operator if implicit type arguments were used.Only print explicit type argument. -
Method Summary
Modifier and TypeMethodDescriptionReturns the enum constant of this type with the specified name.values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
ONLY_PRINT_EXPLICIT_TYPES
Only print explicit type argument. Implicit (i.e. inferred types) are not printed. Consequently, this will also not print a diamond operator. -
ALSO_PRINT_DIAMOND_OPERATOR
Print explicit type arguments, but also print a diamond operator if implicit type arguments were used.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-