Package com.alibaba.fastjson2.util
Class TypeUtils
java.lang.Object
com.alibaba.fastjson2.util.TypeUtils
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> Tstatic <T> Tcast(Object obj, Class<T> targetClass, ObjectReaderProvider provider) static <T> Tstatic Object[]static intstatic doubledoubleValue(boolean isNegative, int decExp, char[] digits, int nDigits) static floatfloatValue(boolean isNegative, int decExponent, char[] digits, int nDigits) static Class<?>getArrayClass(Class componentClass) static Class<?>static ObjectgetDefaultValue(Type paramType) static MapgetInnerMap(Map object) static Class<?>getMapping(Type type) static ClassgetMapping(String typeName) static StringgetTypeName(Class type) static booleanstatic Classstatic BigDecimalparseBigDecimal(byte[] bytes, int off, int len) static BooleanparseBoolean(byte[] bytes, int off, int len) static doubleparseDouble(byte[] in, int off, int len) static doubleparseDouble(char[] in, int off, int len) static floatparseFloat(byte[] in, int off, int len) static floatparseFloat(char[] in, int off, int len) static IntegerparseInt(byte[] bytes, int off, int len) static LongparseLong(byte[] bytes, int off, int len) static BigDecimaltoBigDecimal(Object value) static BigIntegertoBigInteger(Object value) static Booleanstatic booleantoBooleanValue(Object value) static Bytestatic bytetoByteValue(Object value) static Datestatic Doublestatic doubletoDoubleValue(Object value) static Floatstatic floattoFloatValue(Object value) static Instantstatic Integerstatic inttoIntValue(Object value) static Longstatic longtoLongValue(Object value) static Shortstatic shorttoShortValue(Object value) static String[]toStringArray(Object object)
-
Field Details
-
CLASS_JSON_OBJECT_1x
-
FIELD_JSON_OBJECT_1x_map
-
CLASS_JSON_ARRAY_1x
-
CLASS_SINGLE_SET
-
CLASS_SINGLE_List
-
CLASS_UNMODIFIABLE_COLLECTION
-
CLASS_UNMODIFIABLE_LIST
-
CLASS_UNMODIFIABLE_SET
-
CLASS_UNMODIFIABLE_SORTED_SET
-
CLASS_UNMODIFIABLE_NAVIGABLE_SET
-
-
Constructor Details
-
TypeUtils
public TypeUtils()
-
-
Method Details
-
parseDouble
- Throws:
NumberFormatException
-
parseDouble
- Throws:
NumberFormatException
-
parseFloat
- Throws:
NumberFormatException
-
parseFloat
- 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
-
toDate
-
toInstant
-
cast
-
toStringArray
-
cast
-
cast
-
cast
-
getTypeName
-
getMapping
-
toBigDecimal
-
toBigInteger
-
toLong
-
toLongValue
-
parseBoolean
-
parseInt
-
parseLong
-
parseBigDecimal
-
toInteger
-
toByte
-
toByteValue
-
toShort
-
toShortValue
-
toIntValue
-
toBooleanValue
-
toBoolean
-
toFloatValue
-
toFloat
-
toDoubleValue
-
toDouble
-
compare
-
getDefaultValue
-
loadClass
-
getArrayClass
-
getClass
-
isProxy
-
getInnerMap
-