/** * Adds a stack map table for J2ME (CLDC). If another copy of stack map table is already * contained, the old one is removed. * * @param sm the stack map table added to this code attribute. If it is null, a new stack map is * not added. Only the old stack map is removed. * @since 3.12 */ public void setAttribute(StackMap sm) { AttributeInfo.remove(attributes, StackMap.tag); if (sm != null) attributes.add(sm); }
/** * Adds a stack map table. If another copy of stack map table is already contained, the old one is * removed. * * @param smt the stack map table added to this code attribute. If it is null, a new stack map is * not added. Only the old stack map is removed. */ public void setAttribute(StackMapTable smt) { AttributeInfo.remove(attributes, StackMapTable.tag); if (smt != null) attributes.add(smt); }
/** Removes an Exception attribute. */ public void removeExceptionsAttribute() { AttributeInfo.remove(attribute, ExceptionsAttribute.tag); }
/** Removes a Code attribute. */ public void removeCodeAttribute() { AttributeInfo.remove(attribute, CodeAttribute.tag); }
/** * Appends an attribute. If there is already an attribute with the same name, the new one * substitutes for it. * * @see #getAttributes() */ public void addAttribute(AttributeInfo info) { if (attribute == null) attribute = new LinkedList(); AttributeInfo.remove(attribute, info.getName()); attribute.add(info); }