Class TypeUtils

java.lang.Object
com.alibaba.fastjson2.util.TypeUtils

public class TypeUtils extends Object
  • Field Details

    • CLASS_JSON_OBJECT_1x

      public static final Class CLASS_JSON_OBJECT_1x
    • FIELD_JSON_OBJECT_1x_map

      public static final Field FIELD_JSON_OBJECT_1x_map
    • CLASS_JSON_ARRAY_1x

      public static final Class CLASS_JSON_ARRAY_1x
    • CLASS_SINGLE_SET

      public static final Class CLASS_SINGLE_SET
    • CLASS_SINGLE_List

      public static final Class CLASS_SINGLE_List
    • CLASS_UNMODIFIABLE_COLLECTION

      public static final Class CLASS_UNMODIFIABLE_COLLECTION
    • CLASS_UNMODIFIABLE_LIST

      public static final Class CLASS_UNMODIFIABLE_LIST
    • CLASS_UNMODIFIABLE_SET

      public static final Class CLASS_UNMODIFIABLE_SET
    • CLASS_UNMODIFIABLE_SORTED_SET

      public static final Class CLASS_UNMODIFIABLE_SORTED_SET
    • CLASS_UNMODIFIABLE_NAVIGABLE_SET

      public static final Class CLASS_UNMODIFIABLE_NAVIGABLE_SET
  • Constructor Details

    • TypeUtils

      public TypeUtils()
  • Method Details

    • parseDouble

      public static double parseDouble(byte[] in, int off, int len) throws NumberFormatException
      Throws:
      NumberFormatException
    • parseDouble

      public static double parseDouble(char[] in, int off, int len) throws NumberFormatException
      Throws:
      NumberFormatException
    • parseFloat

      public static float parseFloat(byte[] in, int off, int len) throws NumberFormatException
      Throws:
      NumberFormatException
    • parseFloat

      public static float parseFloat(char[] in, int off, int len) throws NumberFormatException
      Throws:
      NumberFormatException
    • doubleValue

      public static double doubleValue(boolean isNegative, int decExp, char[] digits, int nDigits)
    • floatValue

      public static float floatValue(boolean isNegative, int decExponent, char[] digits, int nDigits)
    • getMapping

      public static Class<?> getMapping(Type type)
    • toDate

      public static Date toDate(Object obj)
    • toInstant

      public static Instant toInstant(Object obj)
    • cast

      public static Object[] cast(Object obj, Type[] types)
    • toStringArray

      public static String[] toStringArray(Object object)
    • cast

      public static <T> T cast(Object obj, Type type)
    • cast

      public static <T> T cast(Object obj, Class<T> targetClass)
    • cast

      public static <T> T cast(Object obj, Class<T> targetClass, ObjectReaderProvider provider)
    • getTypeName

      public static String getTypeName(Class type)
    • getMapping

      public static Class getMapping(String typeName)
    • toBigDecimal

      public static BigDecimal toBigDecimal(Object value)
    • toBigInteger

      public static BigInteger toBigInteger(Object value)
    • toLong

      public static Long toLong(Object value)
    • toLongValue

      public static long toLongValue(Object value)
    • parseBoolean

      public static Boolean parseBoolean(byte[] bytes, int off, int len)
    • parseInt

      public static Integer parseInt(byte[] bytes, int off, int len)
    • parseLong

      public static Long parseLong(byte[] bytes, int off, int len)
    • parseBigDecimal

      public static BigDecimal parseBigDecimal(byte[] bytes, int off, int len)
    • toInteger

      public static Integer toInteger(Object value)
    • toByte

      public static Byte toByte(Object value)
    • toByteValue

      public static byte toByteValue(Object value)
    • toShort

      public static Short toShort(Object value)
    • toShortValue

      public static short toShortValue(Object value)
    • toIntValue

      public static int toIntValue(Object value)
    • toBooleanValue

      public static boolean toBooleanValue(Object value)
    • toBoolean

      public static Boolean toBoolean(Object value)
    • toFloatValue

      public static float toFloatValue(Object value)
    • toFloat

      public static Float toFloat(Object value)
    • toDoubleValue

      public static double toDoubleValue(Object value)
    • toDouble

      public static Double toDouble(Object value)
    • compare

      public static int compare(Object a, Object b)
    • getDefaultValue

      public static Object getDefaultValue(Type paramType)
    • loadClass

      public static Class loadClass(String className)
    • getArrayClass

      public static Class<?> getArrayClass(Class componentClass)
    • getClass

      public static Class<?> getClass(Type type)
    • isProxy

      public static boolean isProxy(Class<?> clazz)
    • getInnerMap

      public static Map getInnerMap(Map object)