public void visitConstantInstruction(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, ConstantInstruction constantInstruction) { if (constantInstruction.opcode == InstructionConstants.OP_LDC || constantInstruction.opcode == InstructionConstants.OP_LDC_W) { clazz.constantPoolEntryAccept(constantInstruction.constantIndex, this); } }
public void visitConstantInstruction(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, ConstantInstruction constantInstruction) { if (constantInstruction.opcode == InstructionConstants.OP_NEW) { clazz.constantPoolEntryAccept(constantInstruction.constantIndex, this); } }
public void visitExceptionInfo(Clazz clazz, Method method, CodeAttribute codeAttribute, ExceptionInfo exceptionInfo) { int catchType = exceptionInfo.u2catchType; if (catchType != 0) { clazz.constantPoolEntryAccept(catchType, constantVisitor); } } }
public void visitConstantInstruction(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, ConstantInstruction constantInstruction) { if (constantInstruction.opcode == InstructionConstants.OP_INSTANCEOF) { clazz.constantPoolEntryAccept(constantInstruction.constantIndex, this); } }
/** * Marks the given constant pool entry of the given class. This includes * visiting any other referenced constant pool entries. */ private void markConstant(Clazz clazz, int index) { clazz.constantPoolEntryAccept(index, this); } }
/** * Adds a copy of the specified constant in the given class and returns * its index. If the specified index is 0, the returned value is 0 too. */ public int addConstant(Clazz clazz, int constantIndex) { clazz.constantPoolEntryAccept(constantIndex, this); return this.constantIndex; }
/** * Marks the given constant pool entry of the given class. This includes * visiting any referenced objects. */ private void markConstant(Clazz clazz, int index) { clazz.constantPoolEntryAccept(index, this); } }
/** * Applies the given constant pool visitor to the class constant of the * provides, if any. */ public void providesAccept(Clazz clazz, ConstantVisitor constantVisitor) { if (u2providesIndex != 0) { clazz.constantPoolEntryAccept(u2providesIndex, constantVisitor); } }
/** * Applies the given constant pool visitor to all with entries. */ public void withAccept(Clazz clazz, ConstantVisitor constantVisitor) { // Loop over all u2providesWithIndex entries. for (int index = 0; index < u2providesWithCount; index++) { clazz.constantPoolEntryAccept(u2providesWithIndex[index], constantVisitor); } }
/** * Applies the given constant pool visitor to all targets. */ public void targetsAccept(Clazz clazz, ConstantVisitor constantVisitor) { // Loop over all targets. for (int index = 0; index < u2opensToCount; index++) { clazz.constantPoolEntryAccept(u2opensToIndex[index], constantVisitor); } }
/** * Applies the given constant pool visitor to all exportsToIndex. */ public void exportsToIndexAccept(Clazz clazz, ConstantVisitor constantVisitor) { // Loop over all exportsToIndex. for (int index = 0; index < u2exportsToCount; index++) { clazz.constantPoolEntryAccept(u2exportsToIndex[index], constantVisitor); } }
public void visitAnyRefConstant(Clazz clazz, RefConstant refConstant) { referencingClass = clazz; // Remember the specified class, since it might be different from // the referenced class that acutally contains the class member. clazz.constantPoolEntryAccept(refConstant.u2classIndex, referencedClassFinder); // Make sure the access flags of the referenced class member are // acceptable. refConstant.referencedMemberAccept(this); }
public void visitConstantInstruction(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, ConstantInstruction constantInstruction) { if (constantInstruction.opcode == InstructionConstants.OP_INVOKESPECIAL) { invokesSuperMethods = false; clazz.constantPoolEntryAccept(constantInstruction.constantIndex, this); if (invokesSuperMethods) { setInvokesSuperMethods(method); } } }
public void visitAnyMethodrefConstant(Clazz clazz, RefConstant refConstant) { // Check if this is an interface method. Note that we're interested in // the class of the method reference, not in the class in which the // method was actually found. //refConstant.referencedClassAccept(this); clazz.constantPoolEntryAccept(refConstant.u2classIndex, this); // Get the referenced access flags and names. refConstant.referencedMemberAccept(this); }
public void visitClassConstant(Clazz clazz, ClassConstant classConstant) { Clazz referencedClass = classConstant.referencedClass; if (referencedClass != null) { // Put the actual class's name string in the class pool. name = referencedClass.getName(); clazz.constantPoolEntryAccept(classConstant.u2nameIndex, this); } }
public void visitExceptionInfo(Clazz clazz, Method method, CodeAttribute codeAttribute, ExceptionInfo exceptionInfo) { println(visitorInfo(exceptionInfo) + " ExceptionInfo (" + exceptionInfo.u2startPC + " -> " + exceptionInfo.u2endPC + ": " + exceptionInfo.u2handlerPC + "):"); if (exceptionInfo.u2catchType != 0) { clazz.constantPoolEntryAccept(exceptionInfo.u2catchType, this); } }
public void visitEnclosingMethodAttribute(Clazz clazz, EnclosingMethodAttribute enclosingMethodAttribute) { println(visitorInfo(enclosingMethodAttribute) + " Enclosing method attribute:"); indent(); clazz.constantPoolEntryAccept(enclosingMethodAttribute.u2classIndex, this); if (enclosingMethodAttribute.u2nameAndTypeIndex != 0) { clazz.constantPoolEntryAccept(enclosingMethodAttribute.u2nameAndTypeIndex, this); } outdent(); }
public void visitSignatureAttribute(Clazz clazz, SignatureAttribute signatureAttribute) { println(visitorInfo(signatureAttribute) + " Signature attribute:"); indent(); clazz.constantPoolEntryAccept(signatureAttribute.u2signatureIndex, this); outdent(); }
public void visitSourceFileAttribute(Clazz clazz, SourceFileAttribute sourceFileAttribute) { println(visitorInfo(sourceFileAttribute) + " Source file attribute:"); indent(); clazz.constantPoolEntryAccept(sourceFileAttribute.u2sourceFileIndex, this); outdent(); }
public void visitConstantElementValue(Clazz clazz, Annotation annotation, ConstantElementValue constantElementValue) { println(visitorInfo(constantElementValue) + " Constant element value [" + (constantElementValue.u2elementNameIndex == 0 ? "(default)" : clazz.getString(constantElementValue.u2elementNameIndex)) + " '" + constantElementValue.u1tag + "']"); indent(); clazz.constantPoolEntryAccept(constantElementValue.u2constantValueIndex, this); outdent(); }