Enum Class BasicType

java.lang.Object
java.lang.Enum<BasicType>
org.aoju.bus.core.convert.BasicType
All Implemented Interfaces:
Serializable, Comparable<BasicType>, Constable

public enum BasicType extends Enum<BasicType>
基本变量类型的枚举 基本类型枚举包括原始类型和包装类型
Since:
Java 17+
Author:
Kimi Liu
  • Enum Constant Details

    • BYTE

      public static final BasicType BYTE
      byte
    • SHORT

      public static final BasicType SHORT
      short
    • INT

      public static final BasicType INT
      int
    • INTEGER

      public static final BasicType INTEGER
      integer
    • LONG

      public static final BasicType LONG
      long
    • DOUBLE

      public static final BasicType DOUBLE
      double
    • FLOAT

      public static final BasicType FLOAT
      float
    • BOOLEAN

      public static final BasicType BOOLEAN
      boolean
    • CHAR

      public static final BasicType CHAR
      char
    • CHARACTER

      public static final BasicType CHARACTER
      character
    • STRING

      public static final BasicType STRING
      string
  • Field Details

    • WRAPPER_PRIMITIVE_MAP

      public static final Map<Class<?>,Class<?>> WRAPPER_PRIMITIVE_MAP
      包装类型为Key,原始类型为Value,例如: Integer.class = int.class.
    • PRIMITIVE_WRAPPER_MAP

      public static final Map<Class<?>,Class<?>> PRIMITIVE_WRAPPER_MAP
      原始类型为Key,包装类型为Value,例如: int.class = Integer.class.
  • Method Details

    • values

      public static BasicType[] 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 BasicType 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
    • wrap

      public static Class<?> wrap(Class<?> clazz)
      原始类转为包装类,非原始类返回原类
      Parameters:
      clazz - 原始类
      Returns:
      包装类
    • unWrap

      public static Class<?> unWrap(Class<?> clazz)
      包装类转为原始类,非包装类返回原类
      Parameters:
      clazz - 包装类
      Returns:
      原始类