public void visitAnyClass(Clazz clazz) { // Collect all non-private members in this class hierarchy. clazz.hierarchyAccept(true, true, true, false, new AllMethodVisitor( new MemberAccessFilter(0, ClassConstants.INTERNAL_ACC_PRIVATE, this))); // Clean up for the next class hierarchy. memberMap.clear(); }
public void visitAnyClass(Clazz clazz) { // Collect all non-private members in this class hierarchy. clazz.hierarchyAccept(true, true, true, false, new AllMethodVisitor( new MemberAccessFilter(0, ClassConstants.ACC_PRIVATE | ClassConstants.ACC_STATIC, this))); // Clean up for the next class hierarchy. memberMap.clear(); }
public void visitAnyClass(Clazz clazz) { // Collect all non-private members in this class hierarchy. clazz.hierarchyAccept(true, true, true, false, new AllMethodVisitor( new MemberAccessFilter(0, ClassConstants.ACC_PRIVATE | ClassConstants.ACC_STATIC, this))); // Clean up for the next class hierarchy. memberMap.clear(); }
public void visitClassPool(ClassPool classPool) { // Go over all classes and their methods, marking if parameters are // modified, until no new cases can be found. do { newEscapes = false; if (DEBUG) { System.out.println("ParameterEscapedMarker: new iteration"); } // Go over all classes and their methods once. classPool.classesAccept(parameterEscapedMarker); } while (newEscapes); if (DEBUG) { classPool.classesAccept(new AllMethodVisitor(this)); } }
public void visitClassPool(ClassPool classPool) { // Go over all classes and their methods, marking if parameters are // modified, until no new cases can be found. do { newEscapes = false; if (DEBUG) { System.out.println("ParameterEscapedMarker: new iteration"); } // Go over all classes and their methods once. classPool.classesAccept(parameterEscapedMarker); } while (newEscapes); if (DEBUG) { classPool.classesAccept(new AllMethodVisitor(this)); } }
public void visitAnyClass(Clazz clazz) { // Collect all non-private members in this class hierarchy. clazz.hierarchyAccept(true, true, true, false, new AllMethodVisitor( new MemberAccessFilter(0, ClassConstants.ACC_PRIVATE | ClassConstants.ACC_STATIC, this))); // Clean up for the next class hierarchy. memberMap.clear(); }
public void visitClassPool(ClassPool classPool) { // Go over all classes and their methods, marking if parameters are // modified, until no new cases can be found. do { newEscapes = false; if (DEBUG) { System.out.println("ParameterEscapedMarker: new iteration"); } // Go over all classes and their methods once. classPool.classesAccept(parameterEscapedMarker); } while (newEscapes); if (DEBUG) { classPool.classesAccept(new AllMethodVisitor(this)); } }
/** * Clears any JSE preverification information from the program classes. */ private void clearPreverification() { programClassPool.classesAccept( new ClassVersionFilter(ClassConstants.CLASS_VERSION_1_6, new AllMethodVisitor( new AllAttributeVisitor( new NamedAttributeDeleter(ClassConstants.ATTR_StackMapTable))))); }
/** * Clears any JSE preverification information from the program classes. */ private void clearPreverification() { programClassPool.classesAccept( new ClassVersionFilter(ClassConstants.CLASS_VERSION_1_6, new AllMethodVisitor( new AllAttributeVisitor( new NamedAttributeDeleter(ClassConstants.ATTR_StackMapTable))))); }
/** * Clears any JSE preverification information from the program classes. */ private void clearPreverification() { programClassPool.classesAccept( new ClassVersionFilter(ClassConstants.CLASS_VERSION_1_6, new AllMethodVisitor( new AllAttributeVisitor( new NamedAttributeDeleter(ClassConstants.ATTR_StackMapTable))))); }
public ClassVisitor createClassVisitor() { return new AllMethodVisitor( new AllAttributeVisitor( new EscapingClassMarker())); } };
public ClassVisitor createClassVisitor() { return new AllMethodVisitor( new OptimizationInfoMemberFilter( new ParameterUsageMarker(!methodMarkingStatic, !methodRemovalParameter))); } };
public ClassVisitor createClassVisitor() { return new AllMethodVisitor( new OptimizationInfoMemberFilter( new ParameterUsageMarker(!methodMarkingStatic, !methodRemovalParameter))); } };
public ClassVisitor createClassVisitor() { return new AllMethodVisitor( new AllAttributeVisitor( new EscapingClassMarker())); } };
public ClassVisitor createClassVisitor() { return new AllMethodVisitor( new AllAttributeVisitor( new EscapingClassMarker())); } };
public ClassVisitor createClassVisitor() { return new AllMethodVisitor( new OptimizationInfoMemberFilter( new ParameterUsageMarker(!methodMarkingStatic, !methodRemovalParameter))); } };
private static class MemberFoundException extends RuntimeException {} private static final MemberFoundException MEMBER_FOUND = new MemberFoundException();
private static class MemberFoundException extends RuntimeException {} private static final MemberFoundException MEMBER_FOUND = new MemberFoundException();
private static class MemberFoundException extends RuntimeException {} private static final MemberFoundException MEMBER_FOUND = new MemberFoundException();
/** * Performs preverification of the given program class pool. */ public void execute(ClassPool programClassPool) { // Clean up any old visitor info. programClassPool.classesAccept(new ClassCleaner()); // Preverify all methods. // Classes for JME must be preverified. // Classes for JSE 6 may optionally be preverified. // Classes for JSE 7 or higher must be preverified. programClassPool.classesAccept( new ClassVersionFilter(configuration.microEdition ? ClassConstants.CLASS_VERSION_1_0 : ClassConstants.CLASS_VERSION_1_6, new AllMethodVisitor( new AllAttributeVisitor( new CodePreverifier(configuration.microEdition))))); } }