Enum TypeKind

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<TypeKind>

    public enum TypeKind
    extends java.lang.Enum<TypeKind>
    Specifies kinds of types.

    These correspond to the constants in TypeKind. However, that enum is not available on Android and a warning is produced. So this enum is used instead.

    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      ARRAY
      Corresponds to TypeKind.ARRAY types.
      BOOLEAN
      Corresponds to TypeKind.BOOLEAN types.
      BYTE
      Corresponds to TypeKind.BYTE types.
      CHAR
      Corresponds to TypeKind.CHAR types.
      DECLARED
      Corresponds to TypeKind.DECLARED types.
      DOUBLE
      Corresponds to TypeKind.DOUBLE types.
      ERROR
      Corresponds to TypeKind.ERROR types.
      EXECUTABLE
      Corresponds to TypeKind.EXECUTABLE types.
      FLOAT
      Corresponds to TypeKind.FLOAT types.
      INT
      Corresponds to TypeKind.INT types.
      INTERSECTION
      Corresponds to TypeKind.INTERSECTION types.
      LONG
      Corresponds to TypeKind.LONG types.
      NONE
      Corresponds to TypeKind.NONE types.
      NULL
      Corresponds to TypeKind.NULL types.
      OTHER
      Corresponds to TypeKind.OTHER types.
      PACKAGE
      Corresponds to TypeKind.PACKAGE types.
      SHORT
      Corresponds to TypeKind.SHORT types.
      TYPEVAR
      Corresponds to TypeKind.TYPEVAR types.
      UNION
      Corresponds to TypeKind.UNION types.
      VOID
      Corresponds to TypeKind.VOID types.
      WILDCARD
      Corresponds to TypeKind.WILDCARD types.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static TypeKind valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static TypeKind[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Enum Constant Detail

      • BOOLEAN

        public static final TypeKind BOOLEAN
        Corresponds to TypeKind.BOOLEAN types.
      • BYTE

        public static final TypeKind BYTE
        Corresponds to TypeKind.BYTE types.
      • SHORT

        public static final TypeKind SHORT
        Corresponds to TypeKind.SHORT types.
      • INT

        public static final TypeKind INT
        Corresponds to TypeKind.INT types.
      • LONG

        public static final TypeKind LONG
        Corresponds to TypeKind.LONG types.
      • CHAR

        public static final TypeKind CHAR
        Corresponds to TypeKind.CHAR types.
      • FLOAT

        public static final TypeKind FLOAT
        Corresponds to TypeKind.FLOAT types.
      • DOUBLE

        public static final TypeKind DOUBLE
        Corresponds to TypeKind.DOUBLE types.
      • VOID

        public static final TypeKind VOID
        Corresponds to TypeKind.VOID types.
      • NONE

        public static final TypeKind NONE
        Corresponds to TypeKind.NONE types.
      • NULL

        public static final TypeKind NULL
        Corresponds to TypeKind.NULL types.
      • ARRAY

        public static final TypeKind ARRAY
        Corresponds to TypeKind.ARRAY types.
      • DECLARED

        public static final TypeKind DECLARED
        Corresponds to TypeKind.DECLARED types.
      • ERROR

        public static final TypeKind ERROR
        Corresponds to TypeKind.ERROR types.
      • TYPEVAR

        public static final TypeKind TYPEVAR
        Corresponds to TypeKind.TYPEVAR types.
      • WILDCARD

        public static final TypeKind WILDCARD
        Corresponds to TypeKind.WILDCARD types.
      • PACKAGE

        public static final TypeKind PACKAGE
        Corresponds to TypeKind.PACKAGE types.
      • EXECUTABLE

        public static final TypeKind EXECUTABLE
        Corresponds to TypeKind.EXECUTABLE types.
      • OTHER

        public static final TypeKind OTHER
        Corresponds to TypeKind.OTHER types.
      • UNION

        public static final TypeKind UNION
        Corresponds to TypeKind.UNION types.
      • INTERSECTION

        public static final TypeKind INTERSECTION
        Corresponds to TypeKind.INTERSECTION types.
    • Method Detail

      • values

        public static TypeKind[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (TypeKind c : TypeKind.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static TypeKind valueOf​(java.lang.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:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null