Save This Page
Home » asm-3.1 » org.objectweb » asm » [javadoc | source]
org.objectweb.asm
public class: Attribute [javadoc | source]
java.lang.Object
   org.objectweb.asm.Attribute
A non standard class, field, method or code attribute.
Field Summary
public final  String type    The type of this attribute. 
 byte[] value    The raw value of this attribute, used only for unknown attributes. 
 Attribute next    The next attribute in this attribute list. May be null
Constructor:
 protected Attribute(String type) 
    Constructs a new empty attribute.
    Parameters:
    type - the type of the attribute.
Method from org.objectweb.asm.Attribute Summary:
getCount,   getLabels,   getSize,   isCodeAttribute,   isUnknown,   put,   read,   write
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.objectweb.asm.Attribute Detail:
 final int getCount() 
    Returns the length of the attribute list that begins with this attribute.
 protected Label[] getLabels() 
    Returns the labels corresponding to this attribute.
 final int getSize(ClassWriter cw,
    byte[] code,
    int len,
    int maxStack,
    int maxLocals) 
    Returns the size of all the attributes in this attribute list.
 public boolean isCodeAttribute() 
    Returns true if this type of attribute is a code attribute.
 public boolean isUnknown() 
    Returns true if this type of attribute is unknown. The default implementation of this method always returns true.
 final  void put(ClassWriter cw,
    byte[] code,
    int len,
    int maxStack,
    int maxLocals,
    ByteVector out) 
    Writes all the attributes of this attribute list in the given byte vector.
 protected Attribute read(ClassReader cr,
    int off,
    int len,
    char[] buf,
    int codeOff,
    Label[] labels) 
    Reads a type attribute. This method must return a new Attribute object, of type type , corresponding to the len bytes starting at the given offset, in the given class reader.
 protected ByteVector write(ClassWriter cw,
    byte[] code,
    int len,
    int maxStack,
    int maxLocals) 
    Returns the byte array form of this attribute.