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_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

    • getMapping

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

      public static Date toDate(Object obj)
    • toInstant

      public static Instant toInstant(Object obj)
    • 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)
    • 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)