Class UnsafeUtil

java.lang.Object
dev.drtheo.autojson.util.UnsafeUtil

public class UnsafeUtil extends Object
  • Field Details

    • UNSAFE

      public static final sun.misc.Unsafe UNSAFE
  • Constructor Details

    • UnsafeUtil

      public UnsafeUtil()
  • Method Details

    • computeIfAbsent

      public static <K, V> V computeIfAbsent(Map<K,V> cache, K key, Function<? super K,? extends V> function)
    • isPrimitive

      public static boolean isPrimitive(Type type)
    • isChar

      public static boolean isChar(Class<?> clazz)
    • isNumber

      public static boolean isNumber(Class<?> clazz)
    • isBool

      public static boolean isBool(Class<?> clazz)
    • parseInt

      public static int parseInt(String str)
    • parseDouble

      public static double parseDouble(String str)
    • parseLong

      public static long parseLong(String str)
    • parseFloat

      public static float parseFloat(String str)
    • parseShort

      public static short parseShort(String str)
    • parseByte

      public static byte parseByte(String str)
    • getAllFields

      public static void getAllFields(List<Field> list, Class<?> clazz, Predicate<Field> filter)