public void visitAnyRefConstant(Clazz clazz, RefConstant refConstant) { RefConstant refPatternConstant = (RefConstant)patternConstant; // Check the class and the name and type. matchingConstant = matchingConstantIndices(clazz, refConstant.getClassIndex(), refPatternConstant.getClassIndex()) && matchingConstantIndices(clazz, refConstant.getNameAndTypeIndex(), refPatternConstant.getNameAndTypeIndex()); }
public void visitAnyRefConstant(Clazz clazz, RefConstant refConstant) { RefConstant otherRefConstant = (RefConstant)otherConstant; result = (refConstant.getClassName(clazz) + ' ' + refConstant.getName(clazz) + ' ' + refConstant.getType(clazz)) .compareTo (otherRefConstant.getClassName(clazz) + ' ' + otherRefConstant.getName(clazz) + ' ' + otherRefConstant.getType(clazz)); }
public void visitAnyRefConstant(Clazz clazz, RefConstant refConstant) { // Check the referenced class and class member. if (refConstant.referencedClass != clazz) { referencingClass = clazz; refConstant.referencedClassAccept(this); refConstant.referencedMemberAccept(this); } }
public void visitAnyMethodrefConstant(Clazz clazz, RefConstant refConstant) { // Check the referenced constructor descriptor. if (refConstant.getName(clazz).equals(ClassConstants.METHOD_NAME_INIT)) { descriptor = refConstant.getType(clazz); refConstant.referencedMemberAccept(this); } }
public void visitAnyRefConstant(Clazz clazz, RefConstant refConstant) String className = refConstant.getClassName(clazz); !ClassUtil.isInternalArrayType(className)) String name = refConstant.getName(clazz); String type = refConstant.getType(clazz); boolean isFieldRef = refConstant.getTag() == ClassConstants.CONSTANT_Fieldref;
public void visitAnyMethodrefConstant(Clazz clazz, RefConstant refConstant) { // Pass the referencing class. referencingClass = clazz; // We'll have to assume invoking an unknown method has side effects. hasSideEffects = true; // Check the referenced method, if known. refConstant.referencedMemberAccept(this); }
public void visitAnyRefConstant(Clazz clazz, RefConstant refConstant) { Clazz referencedClass = refConstant.referencedClass; Clazz newReferencedClass = updateReferencedClass(referencedClass); if (referencedClass != newReferencedClass) { if (DEBUG) { System.out.println("TargetClassChanger:"); System.out.println(" ["+clazz.getName()+"] changing reference from ["+refConstant.referencedClass+"."+refConstant.referencedMember.getName(refConstant.referencedClass)+refConstant.referencedMember.getDescriptor(refConstant.referencedClass)+"]"); } // Change the referenced class. refConstant.referencedClass = newReferencedClass; // Change the referenced class member. refConstant.referencedMember = updateReferencedMember(refConstant.referencedMember, refConstant.getName(clazz), refConstant.getType(clazz), newReferencedClass); if (DEBUG) { System.out.println(" ["+clazz.getName()+"] to ["+refConstant.referencedClass+"."+refConstant.referencedMember.getName(refConstant.referencedClass)+refConstant.referencedMember.getDescriptor(refConstant.referencedClass)+"]"); } } }
public void visitAnyMethodrefConstant(Clazz clazz, RefConstant refConstant) { bridgedMethodName = refConstant.getName(clazz); } }
public void visitAnyRefConstant(Clazz clazz, RefConstant refConstant) { Clazz referencedClass = refConstant.referencedClass; // Is it referring to a class member in another class? // The class member might be in another class, or // it may be referenced through another class. if (referencedClass != null && !referencedClass.equals(clazz) || !refConstant.getClassName(clazz).equals(clazz.getName())) { // The referenced class member can never be made private. refConstant.referencedMemberAccept(filteredMemberMarker); } }
public String getRefType(int constantIndex) { try { return ((RefConstant)constantPool[constantIndex]).getType(this); } catch (ClassCastException ex) { throw ((IllegalStateException)new IllegalStateException("Expected RefConstant at index ["+constantIndex+"] in class ["+getName()+"]").initCause(ex)); } }
public String getRefClassName(int constantIndex) { try { return ((RefConstant)constantPool[constantIndex]).getClassName(this); } catch (ClassCastException ex) { throw ((IllegalStateException)new IllegalStateException("Expected RefConstant at index ["+constantIndex+"] in class ["+getName()+"]").initCause(ex)); } }
public void visitAnyRefConstant(Clazz clazz, RefConstant refConstant) { // Let the visitor visit the class referenced in the reference constant. refConstant.referencedClassAccept(classVisitor); }
public void visitAnyRefConstant(Clazz clazz, RefConstant refConstant) String className = refConstant.getClassName(clazz); String name = refConstant.getName(clazz); String type = refConstant.getType(clazz); boolean isFieldRef = refConstant.getTag() == ClassConstants.CONSTANT_Fieldref;
public void visitAnyMethodrefConstant(Clazz clazz, RefConstant refConstant) { // Check the referenced constructor descriptor. if (refConstant.getName(clazz).equals(ClassConstants.METHOD_NAME_INIT)) { descriptor = refConstant.getType(clazz); refConstant.referencedMemberAccept(this); } }
public void visitAnyMethodrefConstant(Clazz clazz, RefConstant refConstant) { // Mark the referenced method. refConstant.referencedMemberAccept(filteredMethodMarker); }
public void visitAnyRefConstant(Clazz clazz, RefConstant refConstant) { Clazz referencedClass = refConstant.referencedClass; Clazz newReferencedClass = updateReferencedClass(referencedClass); if (referencedClass != newReferencedClass) { if (DEBUG) { System.out.println("TargetClassChanger:"); System.out.println(" ["+clazz.getName()+"] changing reference from ["+refConstant.referencedClass+"."+refConstant.referencedMember.getName(refConstant.referencedClass)+refConstant.referencedMember.getDescriptor(refConstant.referencedClass)+"]"); } // Change the referenced class. refConstant.referencedClass = newReferencedClass; // Change the referenced class member. refConstant.referencedMember = updateReferencedMember(refConstant.referencedMember, refConstant.getName(clazz), refConstant.getType(clazz), newReferencedClass); if (DEBUG) { System.out.println(" ["+clazz.getName()+"] to ["+refConstant.referencedClass+"."+refConstant.referencedMember.getName(refConstant.referencedClass)+refConstant.referencedMember.getDescriptor(refConstant.referencedClass)+"]"); } } }
public void visitAnyMethodrefConstant(Clazz clazz, RefConstant refConstant) { bridgedMethodName = refConstant.getName(clazz); } }
public void visitAnyRefConstant(Clazz clazz, RefConstant refConstant) { Clazz referencedClass = refConstant.referencedClass; // Is it refering to a class member in another class? // The class member might be in another class, or // it may be referenced through another class. if (referencedClass != null && !referencedClass.equals(clazz) || !refConstant.getClassName(clazz).equals(clazz.getName())) { // The referenced class member can never be made private. refConstant.referencedMemberAccept(this); } }
public String getRefType(int constantIndex) { try { return ((RefConstant)constantPool[constantIndex]).getType(this); } catch (ClassCastException ex) { throw ((IllegalStateException)new IllegalStateException("Expected RefConstant at index ["+constantIndex+"] in class ["+getName()+"]").initCause(ex)); } }
public String getRefClassName(int constantIndex) { try { return ((RefConstant)constantPool[constantIndex]).getClassName(this); } catch (ClassCastException ex) { throw ((IllegalStateException)new IllegalStateException("Expected RefConstant at index ["+constantIndex+"] in class ["+getName()+"]").initCause(ex)); } }