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); } } }
public boolean isFindSuperClasses() { for (AncestorMode mode : gwtc.inheritanceMode()) { if (mode == AncestorMode.INHERIT_SUPER_CLASSES) { return true; } } return false; }
public boolean isFindEnclosingClasses() { for (AncestorMode mode : gwtc.inheritanceMode()) { if (mode == AncestorMode.INHERIT_ENCLOSING_CLASSES) { return true; } } return false; }
public boolean isFindChild() { for (AncestorMode mode : gwtc.inheritanceMode()) { if (mode == AncestorMode.INHERIT_CHILDREN) { return true; } } return false; }
public boolean isFindAllParents() { for (AncestorMode mode : gwtc.inheritanceMode()) { if (mode == AncestorMode.INHERIT_ALL_PARENTS) { return true; } } return false; }
@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; }
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); } } }