示例#1
1
 protected void maybeAddAncestors(Gwtc gwtc, Class<?> c) {
   addGwtcClass(gwtc, c);
   for (AncestorMode mode : gwtc.inheritanceMode()) {
     switch (mode) {
       case INHERIT_ONE_PARENT:
         Package pkg = c.getPackage();
         gwtc = pkg.getAnnotation(Gwtc.class);
         if (gwtc != null && addPackage(pkg)) {
           addGwtcPackage(gwtc, pkg, false);
         }
         break;
       case INHERIT_ALL_PARENTS:
         addAllPackages(c.getPackage());
         break;
       case INHERIT_ENCLOSING_CLASSES:
         addEnclosingClasses(c);
         break;
       case INHERIT_SUPER_CLASSES:
         addSuperclasses(c);
         break;
       default:
         X_Log.warn("Unsupported mode type", mode, "for class", c);
     }
   }
 }
示例#2
0
 public boolean isFindSuperClasses() {
   for (AncestorMode mode : gwtc.inheritanceMode()) {
     if (mode == AncestorMode.INHERIT_SUPER_CLASSES) {
       return true;
     }
   }
   return false;
 }
示例#3
0
 public boolean isFindEnclosingClasses() {
   for (AncestorMode mode : gwtc.inheritanceMode()) {
     if (mode == AncestorMode.INHERIT_ENCLOSING_CLASSES) {
       return true;
     }
   }
   return false;
 }
示例#4
0
 public boolean isFindChild() {
   for (AncestorMode mode : gwtc.inheritanceMode()) {
     if (mode == AncestorMode.INHERIT_CHILDREN) {
       return true;
     }
   }
   return false;
 }
示例#5
0
 public boolean isFindAllParents() {
   for (AncestorMode mode : gwtc.inheritanceMode()) {
     if (mode == AncestorMode.INHERIT_ALL_PARENTS) {
       return true;
     }
   }
   return false;
 }
示例#6
0
 @SuppressWarnings("incomplete-switch")
 public boolean isFindParent() {
   for (AncestorMode mode : gwtc.inheritanceMode()) {
     switch (mode) {
       case INHERIT_ALL_PARENTS:
       case INHERIT_ONE_PARENT:
         return true;
     }
   }
   return false;
 }
示例#7
0
 protected void maybeAddAncestors(Gwtc gwtc, Package pkg) {
   for (AncestorMode mode : gwtc.inheritanceMode()) {
     switch (mode) {
       case INHERIT_ONE_PARENT:
         if (addPackage(pkg)) {
           addGwtcPackage(gwtc, pkg, false);
         }
         break;
       case INHERIT_ALL_PARENTS:
         addAllPackages(pkg);
         break;
       case INHERIT_CHILDREN:
         needChildren.add(pkg);
       default:
         X_Log.trace("Unsupported ancestor mode", mode, "for package", pkg, "from", "\n" + gwtc);
     }
   }
 }