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 visitProgramMethod(ProgramClass programClass, ProgramMethod programMethod) { if (accepted(programMethod.getAccessFlags())) { memberVisitor.visitProgramMethod(programClass, programMethod); } }
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 visitProgramField(ProgramClass programClass, ProgramField programField) { if (accepted(programField.getAccessFlags())) { memberVisitor.visitProgramField(programClass, programField); } }
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 visitLibraryMethod(LibraryClass libraryClass, LibraryMethod libraryMethod) { if (accepted(libraryMethod.getAccessFlags())) { memberVisitor.visitLibraryMethod(libraryClass, libraryMethod); } }
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 visitLibraryField(LibraryClass libraryClass, LibraryField libraryField) { if (accepted(libraryField.getAccessFlags())) { memberVisitor.visitLibraryField(libraryClass, libraryField); } }
/** * Returns whether the two given classes have class members with the same * name and descriptor. */ private boolean haveAnyIdenticalMethods(Clazz clazz, Clazz targetClass) { MemberCounter counter = new MemberCounter(); // Visit all non-abstract methods, counting the ones that are also // present in the target class. clazz.methodsAccept(new MemberAccessFilter(0, ClassConstants.ACC_ABSTRACT, new SimilarMemberVisitor(targetClass, true, false, false, false, new MemberAccessFilter(0, ClassConstants.ACC_ABSTRACT, counter)))); return counter.getCount() > 0; }
public void visitProgramMethod(ProgramClass programClass, ProgramMethod programMethod) { if (accepted(programMethod.getAccessFlags())) { memberVisitor.visitProgramMethod(programClass, programMethod); } }
/** * Returns whether the two given classes have class members with the same * name and descriptor. */ private boolean haveAnyIdenticalMethods(Clazz clazz, Clazz targetClass) { MemberCounter counter = new MemberCounter(); // Visit all non-abstract methods, counting the ones that are also // present in the target class. clazz.methodsAccept(new MemberAccessFilter(0, ClassConstants.ACC_ABSTRACT, new SimilarMemberVisitor(targetClass, true, false, false, false, new MemberAccessFilter(0, ClassConstants.ACC_ABSTRACT, counter)))); return counter.getCount() > 0; }
public void visitLibraryField(LibraryClass libraryClass, LibraryField libraryField) { if (accepted(libraryField.getAccessFlags())) { memberVisitor.visitLibraryField(libraryClass, libraryField); } }
/** * Returns whether the two given classes have class members with the same * name and descriptor. */ private boolean haveAnyIdenticalMethods(Clazz clazz, Clazz targetClass) { MemberCounter counter = new MemberCounter(); // Visit all non-abstract methods, counting the ones that are also // present in the target class. clazz.methodsAccept(new MemberAccessFilter(0, ClassConstants.ACC_ABSTRACT, new SimilarMemberVisitor(targetClass, true, false, false, false, new MemberAccessFilter(0, ClassConstants.ACC_ABSTRACT, counter)))); return counter.getCount() > 0; }
public void visitLibraryMethod(LibraryClass libraryClass, LibraryMethod libraryMethod) { if (accepted(libraryMethod.getAccessFlags())) { memberVisitor.visitLibraryMethod(libraryClass, libraryMethod); } }
/** * Returns whether the two given classes have initializers with the same * descriptors. */ private boolean haveAnyIdenticalInitializers(Clazz clazz, Clazz targetClass) { MemberCounter counter = new MemberCounter(); // TODO: Currently checking shared methods, not just initializers. // TODO: Allow identical methods. // Visit all methods, counting the ones that are also present in the // target class. clazz.methodsAccept(//new MemberNameFilter(new FixedStringMatcher(ClassConstants.INTERNAL_METHOD_NAME_INIT), new SimilarMemberVisitor(targetClass, true, false, false, false, new MemberAccessFilter(0, ClassConstants.INTERNAL_ACC_ABSTRACT, counter))); return counter.getCount() > 0; }
public void visitProgramField(ProgramClass programClass, ProgramField programField) { if (accepted(programField.getAccessFlags())) { memberVisitor.visitProgramField(programClass, programField); } }
/** * Returns whether the given class or its subclasses shadow any fields in * the given target class. */ private boolean shadowsAnyFields(Clazz clazz, Clazz targetClass) { MemberCounter counter = new MemberCounter(); // Visit all fields, counting the ones that are shadowing non-private // fields in the class hierarchy of the target class. clazz.hierarchyAccept(true, false, false, true, new AllFieldVisitor( new SimilarMemberVisitor(targetClass, true, true, true, false, new MemberAccessFilter(0, ClassConstants.ACC_PRIVATE, counter)))); return counter.getCount() > 0; }
public void visitLibraryMethod(LibraryClass libraryClass, LibraryMethod libraryMethod) { if (accepted(libraryMethod.getAccessFlags())) { memberVisitor.visitLibraryMethod(libraryClass, libraryMethod); } }
/** * Returns whether the given class or its subclasses shadow any fields in * the given target class. */ private boolean shadowsAnyFields(Clazz clazz, Clazz targetClass) { MemberCounter counter = new MemberCounter(); // Visit all fields, counting the ones that are shadowing non-private // fields in the class hierarchy of the target class. clazz.hierarchyAccept(true, false, false, true, new AllFieldVisitor( new SimilarMemberVisitor(targetClass, true, true, true, false, new MemberAccessFilter(0, ClassConstants.ACC_PRIVATE, counter)))); return counter.getCount() > 0; }
public void visitProgramMethod(ProgramClass programClass, ProgramMethod programMethod) { if (accepted(programMethod.getAccessFlags())) { memberVisitor.visitProgramMethod(programClass, programMethod); } }