Interface TypeEnum

All Superinterfaces:
Type

@Immutable public interface TypeEnum extends Type
Enumeration type. It captures the value-type of the enumeration and its values.
  • Method Details

    • of

      static TypeEnum of(TypeName typeName, Type valueType, List<String> values)
      Creates a new enumeration type instance.
      Parameters:
      typeName - the type name
      valueType - the enumeration value-type
      values - the enumeration values
      Returns:
      a type wrapping the enumeration data
    • innerType

      Type innerType()
      Returns the inner type of the enumeration.
      Returns:
      the inner type of the enumeration
    • values

      List<String> values()
      Returns the enumeration values.
      Returns:
      the enumeration values
    • isEnum

      default boolean isEnum()
      Description copied from interface: Type
      Returns true if this type represents an enumeration.
      Specified by:
      isEnum in interface Type
      Returns:
      true if this type represents an enumeration