Beispiel #1
0
  public void visitCodeAttribute(Clazz clazz, Method method, CodeAttribute codeAttribute) {
    markAsUsed(codeAttribute);

    markConstant(clazz, codeAttribute.u2attributeNameIndex);

    // Mark the constant pool entries referenced by the instructions,
    // by the exceptions, and by the attributes.
    codeAttribute.instructionsAccept(clazz, method, this);
    codeAttribute.exceptionsAccept(clazz, method, this);
    codeAttribute.attributesAccept(clazz, method, this);
  }
  public void visitCodeAttribute(Clazz clazz, Method method, CodeAttribute codeAttribute) {
    // Set up the code attribute editor.
    codeAttributeEditor.reset(codeAttribute.u4codeLength);

    // Find the peephole changes.
    codeAttribute.instructionsAccept(clazz, method, instructionSequenceReplacer);

    // Apply the peephole changes.
    codeAttributeEditor.visitCodeAttribute(clazz, method, codeAttribute);
  }
 public void visitCodeAttribute(Clazz clazz, Method method, CodeAttribute codeAttribute) {
   // Visit the attributes of the code attribute.
   codeAttribute.attributesAccept(clazz, method, this);
 }