/** * Get meta annotation from an annotation * * @param store the annotation which annotated by meta annotation * @param clazz the meta annotation * @return if store has annotated by meta annotation, return that annotation, otherwise, return * null */ public static <T extends Annotation> T getMetaAnnotation(Annotation store, Class<T> clazz) { ClassType annoClass = TypeOracle.Instance.getClassType(store.annotationType()); if (annoClass != null) { return ReflectionUtils.getAnnotation(annoClass.getAnnotations(), clazz); } return null; }
public static boolean checkReflection(String className) { boolean result = TypeOracle.Instance.getClassType(className) != null; if (!result) ReflectionUtils.reflectionRequired(className, ""); return result; }
/** * Check clazz to see if it have reflection information if not, raise a * ReflectionRequiredException * * @param clazz */ public static void checkReflection(Class<?> clazz) { boolean result = TypeOracle.Instance.getClassType(clazz) != null; if (!result) ReflectionUtils.reflectionRequired(clazz.getName(), ""); }