Пример #1
0
  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);
  }
Пример #2
0
 /**
  * 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);
 }