public static MethodInfo getMethodInfo(final Member member, final int modifiers) { final Signature sig = getSignature(member); return new MethodInfo() { private ClassInfo ci; public ClassInfo getClassInfo() { if (ci == null) ci = ReflectUtils.getClassInfo(member.getDeclaringClass()); return ci; } public int getModifiers() { return modifiers; } public Signature getSignature() { return sig; } public Type[] getExceptionTypes() { return ReflectUtils.getExceptionTypes(member); } public Attribute getAttribute() { return null; } }; }
public void visitAttribute(final Attribute attr) { buf.setLength(0); buf.append(tab).append("ATTRIBUTE "); appendDescriptor(-1, attr.type); if (attr instanceof Traceable) { ((Traceable) attr).trace(buf, labelNames); } else { buf.append(" : unknown\n"); } text.add(buf.toString()); if (mv != null) { mv.visitAttribute(attr); } }
/** * Visits a non standard attribute of this class, field or method. * * @param attr an attribute. */ public void visitAttribute(final Attribute attr) { if (attrs == null) { attrs = new ArrayList(1); } attrs.add(attr); }
public void visitAttribute(final Attribute attr) { checkEnd(); if (attr == null) { throw new IllegalArgumentException("Invalid attribute (must not be null)"); } fv.visitAttribute(attr); }
public void visitAttribute(final Attribute attr) { checkState(); if (attr == null) { throw new IllegalArgumentException("Invalid attribute (must not be null)"); } cv.visitAttribute(attr); }
public void visitAttribute(final Attribute attr) { checkEndMethod(); if (attr == null) { throw new IllegalArgumentException("Invalid attribute (must not be null)"); } mv.visitAttribute(attr); }
public void visitAttribute(final Attribute attr) { super.visitAttribute(attr); if (fv != null) { fv.visitAttribute(attr); } }
public void visitAttribute(final Attribute attr) { text.add("\n"); super.visitAttribute(attr); if (cv != null) { cv.visitAttribute(attr); } }
/** * Prints the ASM code that generates the given attribute. * * @param attr an attribute. */ public void visitAttribute(final Attribute attr) { buf.setLength(0); buf.append("// ATTRIBUTE ").append(attr.type).append('\n'); if (attr instanceof ASMifiable) { buf.append("{\n"); ((ASMifiable) attr).asmify(buf, "attr", labelNames); buf.append(name).append(".visitAttribute(attr);\n"); buf.append("}\n"); } text.add(buf.toString()); }
/** * Prints a disassembled view of the given attribute. * * @param attr an attribute. */ public void visitAttribute(final Attribute attr) { buf.setLength(0); buf.append(tab).append("ATTRIBUTE "); appendDescriptor(-1, attr.type); if (attr instanceof Traceable) { ((Traceable) attr).trace(buf, null); } else { buf.append(" : unknown\n"); } text.add(buf.toString()); }
public ClassReaderGenerator(ClassReader r, Attribute[] attrs, int flags) { this.r = r; this.attrs = (attrs != null) ? attrs : new Attribute[0]; this.flags = flags; }
public void visitAttribute(Attribute attr) { fv1.visitAttribute(attr); fv2.visitAttribute(attr); }
protected Attribute[] attributes() { return null; }
@Override public void visitAttribute(Attribute attr) {}