Package net.sf.rej.java.attribute

Examples of net.sf.rej.java.attribute.Attributes.addAttribute()


        Attributes attrs = method.getAttributes();
        ExceptionsAttribute ea = new ExceptionsAttribute(exAttrNameIndex, this.cp, exceptionList);
        if (this.oldExAttr != null) {
          attrs.removeAttribute(this.oldExAttr);
        }
        attrs.addAttribute(ea);
    }

    public void undo() {
        this.method.setNameIndex(this.oldNameIndex);
        this.method.setDescriptorIndex(this.oldDescIndex);
View Full Code Here


        }

        Attributes attrs = method.getAttributes();
        attrs.removeAttribute(attrs.getExceptionsAttribute());
        if (this.oldExAttr != null) {
          attrs.addAttribute(this.oldExAttr);
        }

        for (int index : this.createdPoolItems) {
          this.cp.removeLast(index);
        }
View Full Code Here

        method.setAccessFlags(accessFlags);
        method.setNameIndex(nameIndex);
        method.setDescriptorIndex(descIndex);
        Attributes attributes = new Attributes();
        CodeAttribute ca = new CodeAttribute(codeAttrNameIndex, cp, maxStackSize, maxLocals);
        attributes.addAttribute(ca);
        ExceptionsAttribute ea = new ExceptionsAttribute(exAttrNameIndex, cp, exceptions);
        attributes.addAttribute(ea);
        method.setAttributes(attributes);
        return method;
    }
View Full Code Here

        method.setDescriptorIndex(descIndex);
        Attributes attributes = new Attributes();
        CodeAttribute ca = new CodeAttribute(codeAttrNameIndex, cp, maxStackSize, maxLocals);
        attributes.addAttribute(ca);
        ExceptionsAttribute ea = new ExceptionsAttribute(exAttrNameIndex, cp, exceptions);
        attributes.addAttribute(ea);
        method.setAttributes(attributes);
        return method;
    }

}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.