Example #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);
     }
   }
 }
Example #2
0
 protected void addGwtcSettings(Gwtc gwtc) {
   for (Dependency dep : gwtc.dependencies()) {
     addDependency(dep);
   }
   for (GwtcProperties prop : gwtc.propertiesLaunch()) {
     addLaunchProperty(prop);
   }
 }
Example #3
0
 public boolean isFindSuperClasses() {
   for (AncestorMode mode : gwtc.inheritanceMode()) {
     if (mode == AncestorMode.INHERIT_SUPER_CLASSES) {
       return true;
     }
   }
   return false;
 }
Example #4
0
 public boolean isFindEnclosingClasses() {
   for (AncestorMode mode : gwtc.inheritanceMode()) {
     if (mode == AncestorMode.INHERIT_ENCLOSING_CLASSES) {
       return true;
     }
   }
   return false;
 }
Example #5
0
 public boolean isFindChild() {
   for (AncestorMode mode : gwtc.inheritanceMode()) {
     if (mode == AncestorMode.INHERIT_CHILDREN) {
       return true;
     }
   }
   return false;
 }
Example #6
0
 public boolean isFindAllParents() {
   for (AncestorMode mode : gwtc.inheritanceMode()) {
     if (mode == AncestorMode.INHERIT_ALL_PARENTS) {
       return true;
     }
   }
   return false;
 }
Example #7
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;
 }
Example #8
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);
     }
   }
 }