implements FieldAmmendment, FrameAmmendment {
boolean ignoreClass(ClassInfo ci) {
- String pName = ci.getPackageName();
- if (pName.startsWith("org.codehaus.groovy")) {
- // System.out.println("Ignoring "+pName);
+ String pName = ci.getName();
+ if (pName.startsWith("org")) {
+ if (pName.startsWith("org.codehaus.groovy")) {
+ // System.out.println("Ignoring "+pName);
+ return true;
+ }
+ if (pName.startsWith("org.apache.groovy")) {
+ // System.out.println("Ignoring "+pName);
+ return true;
+ }
+ } else if (pName.startsWith("java")) {
+ if (pName.startsWith("java.lang")) {
+ if (pName.startsWith("java.lang.reflect")) {
+ return true;
+ }
+ if (pName.startsWith("java.lang.ref")) {
+ return true;
+ }
+ if (pName.startsWith("java.lang.ClassLoader")) {
+ return true;
+ }
+ if (pName.startsWith("java.lang.Thread$State")) {
+ return true;
+ }
+ if (pName.startsWith("java.lang.Class"))
+ return true;
+ if (pName.startsWith("java.lang.Package"))
+ return true;
+ } else {
+ if (pName.startsWith("java.util.concurrent")) {
+ // System.out.println("Ignoring "+pName);
+ return true;
+ }
+ if (pName.startsWith("java.util.logging")) {
+ // System.out.println("Ignoring "+pName);
+ return true;
+ }
+ if (pName.startsWith("java.beans")) {
+ return true;
+ }
+ if (pName.startsWith("java.io.OutputStreamWriter"))
+ return true;
+ if (pName.startsWith("java.io.PrintStream"))
+ return true;
+ if (pName.startsWith("java.io.BufferedWriter"))
+ return true;
+ }
+ if (pName.startsWith("java.nio.charset"))
+ return true;
+
+ } else if (pName.startsWith("groovy")) {
+ if (pName.startsWith("groovy.lang")) {
+ // System.out.println("Ignoring "+pName);
+ return true;
+ }
+ if (pName.startsWith("groovyjarjarasm.asm")) {
+ // System.out.println("Ignoring "+pName);
+ return true;
+ }
+ }
+ if (pName.startsWith("com.sun.beans")) {
return true;
}
- if (pName.startsWith("groovy.lang")) {
- // System.out.println("Ignoring "+pName);
+ if (pName.startsWith("sun.reflect")) {
return true;
}
+ if (pName.startsWith("sun.misc.SharedSecrets"))
+ return true;
+ if (pName.startsWith("sun.util.logging"))
+ return true;
+ if (pName.startsWith("sun.net.www"))
+ return true;
+
return false;
}
ClassInfo ci = fi.getClassInfo();
if (ignoreClass(ci))
return POLICY_IGNORE;
-
+ ClassInfo civ = fi.getTypeClassInfo();
+ if (ignoreClass(civ))
+ return POLICY_IGNORE;
return sofar;
}
sofar.includeLocals = false;
sofar.includeOps = false;
sofar.includePC = false;
+ } else {
+ // System.out.println("Including M: " +mi);
}
return sofar;