Enum ArrayType

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

    public enum ArrayType
    extends java.lang.Enum<ArrayType>
    Represents all array types in the JVM.

    These constants are returned by ArrayDescriptor.getType().

    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static ArrayType getById​(int id)
      Converts an integer id to the corresponding constant.
      int getId()
      Converts the constant to an integer id.
      static ArrayType valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static ArrayType[] 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

      • OBJECT_ARRAY

        public static final ArrayType OBJECT_ARRAY
        Array of reference types.
      • BOOLEAN_ARRAY

        public static final ArrayType BOOLEAN_ARRAY
        Array of boolean.
      • BYTE_ARRAY

        public static final ArrayType BYTE_ARRAY
        Array of byte.
      • CHAR_ARRAY

        public static final ArrayType CHAR_ARRAY
        Array of char.
      • SHORT_ARRAY

        public static final ArrayType SHORT_ARRAY
        Array of short.
      • INT_ARRAY

        public static final ArrayType INT_ARRAY
        Array of int.
      • LONG_ARRAY

        public static final ArrayType LONG_ARRAY
        Array of long.
      • FLOAT_ARRAY

        public static final ArrayType FLOAT_ARRAY
        Array of float.
      • DOUBLE_ARRAY

        public static final ArrayType DOUBLE_ARRAY
        Array of double.
    • Method Detail

      • values

        public static ArrayType[] 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 (ArrayType c : ArrayType.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static ArrayType 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
      • getById

        public static ArrayType getById​(int id)
        Converts an integer id to the corresponding constant.
        Parameters:
        id - the id
        Returns:
        the constant or null if a wring id is passed
      • getId

        public int getId()
        Converts the constant to an integer id.
        Returns:
        the id