コード例 #1
0
ファイル: ReflectionUtils.java プロジェクト: nikelin/gwtent
 /**
  * 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;
 }
コード例 #2
0
ファイル: ReflectionUtils.java プロジェクト: nikelin/gwtent
  public static boolean checkReflection(String className) {
    boolean result = TypeOracle.Instance.getClassType(className) != null;

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

    return result;
  }
コード例 #3
0
ファイル: ReflectionUtils.java プロジェクト: nikelin/gwtent
  /**
   * 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(), "");
  }