Enum ElementPrinterHelper.PrintTypeArguments

All Implemented Interfaces:
Serializable, Comparable<ElementPrinterHelper.PrintTypeArguments>
Enclosing class:

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


      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.

      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.
      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.)
      name - the name of the enum constant to be returned.
      the enum constant with the specified name
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null