@Test public void testKind() { eq(Cls.kindOf(String.class), TypeKind.STRING); eq(Cls.kindOf(double.class), TypeKind.DOUBLE); eq(Cls.kindOf(Double.class), TypeKind.DOUBLE_OBJ); eq(Cls.kindOf(byte[].class), TypeKind.BYTE_ARR); eq(Cls.kindOf(HashSet.class), TypeKind.SET); eq(Cls.kindOf(HashMap.class), TypeKind.MAP); eq(Cls.kindOf(ArrayList.class), TypeKind.LIST); eq(Cls.kindOf(Date.class), TypeKind.DATE); eq(Cls.kindOf(Time.class), TypeKind.DATE); eq(Cls.kindOf(Timestamp.class), TypeKind.DATE); }
public static TypeKind kindOf(Class<?> type) { return TypeKind.ofType(type); }
Cls extends RapidoidThing { public static TypeKind kindOf(Class<?> type) { return TypeKind.ofType(type); } }
Cls extends RapidoidThing { public static TypeKind kindOf(Class<?> type) { return TypeKind.ofType(type); }  }
Cls extends RapidoidThing { public static TypeKind kindOf(Class<?> type) { return TypeKind.ofType(type); }  static TypeKind kindOf(Class<?> type); static TypeKind kindOf(Object value); @SuppressWarnings("unchecked") static T getFieldValue(Object instance, String fieldName, T defaultValue); static Object getFieldValue(Object instance, String fieldName); static Object getFieldValue(Field field, Object instance); static List<Annotation> getAnnotations(Class<?> clazz); static List<Method> getMethods(Class<?> clazz); static List<Method> getMethodsNamed(Class<?> clazz, String name); static Method getMethod(Class<?> clazz, String name, Class<?>... parameterTypes); static Method findMethod(Class<?> clazz, String name, Class<?>... parameterTypes); static Field findField(Class<?> clazz, String name); @SuppressWarnings("unchecked") static T invokeStatic(Method m, Object... args); @SuppressWarnings("unchecked") static T invoke(Method m, Object target, Object... args); @SuppressWarnings("unchecked") static T invoke(Constructor<?> constructor, Object... args); @SuppressWarnings("unchecked") static T invokeRethrowing(Method method, Object target, Object... args); static Class<?>[] getImplementedInterfaces(Class<?> clazz); @SuppressWarnings("unchecked") static T newInstance(Class<T> clazz, Map<String, Object> properties); static Object[] getAssignableArgs(Class<?>[] types, Collection<?> properties); @SuppressWarnings("unchecked") static T getUniqueInstanceOf(Class<T> type, Collection<?> values); static ClassLoader classLoader(); @SuppressWarnings("unchecked") static T convert(String value, Class<T> toType); @SuppressWarnings("unchecked") static T convert(Object value, Class<T> toType); static Method findMethodByArgs(Class<? extends Object> clazz, String name, Object... args); @SuppressWarnings("unchecked") static Class<T> clazz(Type type); @SuppressWarnings("unchecked") static Class<T> of(T obj); static String str(Object value); static boolean bool(Object value); static ParameterizedType generic(Type type); static boolean isJREClass(String className); static boolean isJREType(Class<?> type); @SuppressWarnings("unchecked") static Class<T> getWrapperClass(Class<T> c); static boolean instanceOf(Object obj, Class<?>... classes); static boolean isAssignableTo(Class<?> clazz, Class<?>... targetClasses); static boolean areAssignable(Class<?>[] types, Object[] values); @SuppressWarnings("unchecked") static T newInstance(Class<T> clazz); static T newBeanInstance(Class<T> clazz); @SuppressWarnings("unchecked") static T newInstance(Class<T> clazz, Object... args); static T customizable(Class<T> clazz, Object... args); @SuppressWarnings("unchecked") static Class<T> getClassIfExists(String className); static Class<T> get(String className); static Class<?> unproxy(Class<?> cls); static boolean isSimple(Object target); static boolean isNumber(Object target); static boolean isDataStructure(Class<?> clazz); static boolean isBeanType(Class<?> clazz); static boolean isAppBeanType(Class<?> clazz); static boolean isBean(Object target); static boolean isAppBean(Object target); static T struct(Class<T> clazz1, Class<T2> clazz2, Object obj); static boolean exists(String className); static Class<?> toClass(Object classOrInstance); static boolean isAnnotated(Class<?> type, Class<? extends Annotation> annotation); }
Cls extends RapidoidThing { public static TypeKind kindOf(Class<?> type) { return TypeKind.ofType(type); }  static TypeKind kindOf(Class<?> type); static TypeKind kindOf(Object value); @SuppressWarnings("unchecked") static T getFieldValue(Object instance, String fieldName, T defaultValue); static Object getFieldValue(Object instance, String fieldName); static Object getFieldValue(Field field, Object instance); static List<Annotation> getAnnotations(Class<?> clazz); static List<Method> getMethods(Class<?> clazz); static List<Method> getMethodsNamed(Class<?> clazz, String name); static Method getMethod(Class<?> clazz, String name, Class<?>... parameterTypes); static Method findMethod(Class<?> clazz, String name, Class<?>... parameterTypes); static Field findField(Class<?> clazz, String name); @SuppressWarnings("unchecked") static T invokeStatic(Method m, Object... args); @SuppressWarnings("unchecked") static T invoke(Method m, Object target, Object... args); @SuppressWarnings("unchecked") static T invoke(Constructor<?> constructor, Object... args); @SuppressWarnings("unchecked") static T invokeRethrowing(Method method, Object target, Object... args); static Class<?>[] getImplementedInterfaces(Class<?> clazz); @SuppressWarnings("unchecked") static T newInstance(Class<T> clazz, Map<String, Object> properties); static Object[] getAssignableArgs(Class<?>[] types, Collection<?> properties); @SuppressWarnings("unchecked") static T getUniqueInstanceOf(Class<T> type, Collection<?> values); static ClassLoader classLoader(); @SuppressWarnings("unchecked") static T convert(String value, Class<T> toType); @SuppressWarnings("unchecked") static T convert(Object value, Class<T> toType); static Method findMethodByArgs(Class<? extends Object> clazz, String name, Object... args); @SuppressWarnings("unchecked") static Class<T> clazz(Type type); @SuppressWarnings("unchecked") static Class<T> of(T obj); static String str(Object value); static boolean bool(Object value); static ParameterizedType generic(Type type); static boolean isJREClass(String className); static boolean isJREType(Class<?> type); @SuppressWarnings("unchecked") static Class<T> getWrapperClass(Class<T> c); static boolean instanceOf(Object obj, Class<?>... classes); static boolean isAssignableTo(Class<?> clazz, Class<?>... targetClasses); static boolean areAssignable(Class<?>[] types, Object[] values); @SuppressWarnings("unchecked") static T newInstance(Class<T> clazz); static T newBeanInstance(Class<T> clazz); @SuppressWarnings("unchecked") static T newInstance(Class<T> clazz, Object... args); static T customizable(Class<T> clazz, Object... args); @SuppressWarnings("unchecked") static Class<T> getClassIfExists(String className); static Class<T> get(String className); static Class<?> unproxy(Class<?> cls); static boolean isSimple(Object target); static boolean isNumber(Object target); static boolean isDataStructure(Class<?> clazz); static boolean isBeanType(Class<?> clazz); static boolean isAppBeanType(Class<?> clazz); static boolean isBean(Object target); static boolean isAppBean(Object target); static T struct(Class<T> clazz1, Class<T2> clazz2, Object obj); static boolean exists(String className); static Class<?> toClass(Object classOrInstance); static boolean isAnnotated(Class<?> type, Class<? extends Annotation> annotation);  }