Esempio n. 1
0
 /**
  * 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);
 }
Esempio n. 2
0
 /**
  * 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);
 }
Esempio n. 3
0
 /** Removes an Exception attribute. */
 public void removeExceptionsAttribute() {
   AttributeInfo.remove(attribute, ExceptionsAttribute.tag);
 }
Esempio n. 4
0
 /** Removes a Code attribute. */
 public void removeCodeAttribute() {
   AttributeInfo.remove(attribute, CodeAttribute.tag);
 }
Esempio n. 5
0
  /**
   * 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);
  }