Enum Class PrimitiveKind

java.lang.Object
java.lang.Enum<PrimitiveKind>
net.codecrete.windowsapi.metadata.PrimitiveKind
All Implemented Interfaces:
Serializable, Comparable<PrimitiveKind>, Constable

public enum PrimitiveKind extends Enum<PrimitiveKind>
Enumeration of all primitive types.
  • Enum Constant Details

    • VOID

      public static final PrimitiveKind VOID
      Void.

      Either used to represent the return type of functions not returning anything, or for pointer types pointing to an unknown/opaque data structure.

    • BOOL

      public static final PrimitiveKind BOOL
      Boolean.
    • CHAR

      public static final PrimitiveKind CHAR
      Character.

      A character is a UTF-16 code unit, i.e., it is 2 bytes long.

    • SBYTE

      public static final PrimitiveKind SBYTE
      Signed byte.
    • BYTE

      public static final PrimitiveKind BYTE
      Unsigned byte.
    • INT16

      public static final PrimitiveKind INT16
      Signed 16-bit integer.
    • UINT16

      public static final PrimitiveKind UINT16
      Unsigned 16-bit integer.
    • INT32

      public static final PrimitiveKind INT32
      Signed 32-bit integer.
    • UINT32

      public static final PrimitiveKind UINT32
      Unsigned 32-bit integer.
    • INT64

      public static final PrimitiveKind INT64
      Signed 64-bit integer.
    • UINT64

      public static final PrimitiveKind UINT64
      Unsigned 64-bit integer.
    • SINGLE

      public static final PrimitiveKind SINGLE
      Single-precision floating-point number (4 bytes long).
    • DOUBLE

      public static final PrimitiveKind DOUBLE
      Double-precision floating-point number (8 bytes long).
    • STRING

      public static final PrimitiveKind STRING
      String.

      Usually, the string is encoded in UTF-16. Some string constants are indicated to be ANSI-encoded, i.e., it uses a byte-wise encoding.

    • INT_PTR

      public static final PrimitiveKind INT_PTR
      A signed integer sufficiently large to hold a pointer.
    • UINT_PTR

      public static final PrimitiveKind UINT_PTR
      An unsigned integer sufficiently large to hold a pointer.
  • Method Details

    • values

      public static PrimitiveKind[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static PrimitiveKind valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified name
      NullPointerException - if the argument is null
    • typeName

      public String typeName()
      Gets the name of the primitive.
      Returns:
      the name