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 Details

    • ONLY_PRINT_EXPLICIT_TYPES

      public static final ElementPrinterHelper.PrintTypeArguments 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

      public static final ElementPrinterHelper.PrintTypeArguments ALSO_PRINT_DIAMOND_OPERATOR
      Print explicit type arguments, but also print a diamond operator if implicit type arguments were used.
  • Method Details

    • values

      public static ElementPrinterHelper.PrintTypeArguments[] 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

      public static ElementPrinterHelper.PrintTypeArguments valueOf(String name)
      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 name
      NullPointerException - if the argument is null