コード例 #1
0
  public void visitSignatureAttribute(
      Clazz clazz, Method method, SignatureAttribute signatureAttribute) {
    // Compute the new signature.
    String signature = clazz.getString(signatureAttribute.u2signatureIndex);
    String newSignature = shrinkDescriptor(method, signature);

    // Update the signature.
    signatureAttribute.u2signatureIndex =
        new ConstantPoolEditor((ProgramClass) clazz).addUtf8Constant(newSignature);

    // Update the referenced classes.
    signatureAttribute.referencedClasses =
        shrinkReferencedClasses(method, signature, signatureAttribute.referencedClasses);
  }
コード例 #2
0
 public void visitSignatureAttribute(Clazz clazz, SignatureAttribute signatureAttribute) {
   // Let the visitor visit the classes referenced in the signature string.
   signatureAttribute.referencedClassesAccept(classVisitor);
 }