Package dev.drtheo.autojson.util
Class UnsafeUtil
-
- All Implemented Interfaces:
public class UnsafeUtil
-
-
Field Summary
Fields Modifier and Type Field Description public final static UnsafeUNSAFE
-
Constructor Summary
Constructors Constructor Description UnsafeUtil()
-
Method Summary
Modifier and Type Method Description static <K, V> VcomputeIfAbsent(Map<K, V> cache, K key, Function<in K, out V> function)static booleanisPrimitive(Type type)static booleanisChar(Class<out Object> clazz)static booleanisNumber(Class<out Object> clazz)static booleanisBool(Class<out Object> clazz)static intparseInt(String str)static doubleparseDouble(String str)static longparseLong(String str)static floatparseFloat(String str)static shortparseShort(String str)static byteparseByte(String str)static voidgetAllFields(List<Field> list, Class<out Object> clazz, Predicate<Field> filter)-
-
Method Detail
-
computeIfAbsent
static <K, V> V computeIfAbsent(Map<K, V> cache, K key, Function<in K, out V> function)
-
isPrimitive
static boolean isPrimitive(Type type)
-
parseDouble
static double parseDouble(String str)
-
parseFloat
static float parseFloat(String str)
-
parseShort
static short parseShort(String str)
-
-
-
-