public void visitConstantInstruction( Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, ConstantInstruction constantInstruction) { markConstant(clazz, constantInstruction.constantIndex); // Also mark the parameterless constructor of the class, in case the // string constant or class constant is being used in a Class.forName // or a .class construct. clazz.constantPoolEntryAccept( constantInstruction.constantIndex, parameterlessConstructorMarker); }
/** * 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); }