Example #1
0
 /**
  * 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;
 }
Example #2
0
  public static boolean checkReflection(String className) {
    boolean result = TypeOracle.Instance.getClassType(className) != null;

    if (!result) ReflectionUtils.reflectionRequired(className, "");

    return result;
  }
Example #3
0
  /**
   * 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(), "");
  }