| 
 | |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--org.apache.bcel.classfile.Attribute
Abstract super class for Attribute objects. Currently the ConstantValue, SourceFile, Code, Exceptiontable, LineNumberTable, LocalVariableTable, InnerClasses and Synthetic attributes are supported. The Unknown attribute stands for non-standard-attributes.
ConstantValue, 
SourceFile, 
Code, 
Unknown, 
ExceptionTable, 
LineNumberTable, 
LocalVariableTable, 
InnerClasses, 
Synthetic, 
Deprecated, 
Signature, 
Serialized Form| Field Summary | |
| protected  ConstantPool | constant_pool | 
| protected  int | length | 
| protected  int | name_index | 
| protected  byte | tag | 
| Constructor Summary | |
| protected  | Attribute(byte tag,
          int name_index,
          int length,
          ConstantPool constant_pool) | 
| Method Summary | |
| abstract  void | accept(Visitor v)Called by objects that are traversing the nodes of the tree implicitely defined by the contents of a Java class. | 
| static void | addAttributeReader(java.lang.String name,
                   AttributeReader r)Add an Attribute reader capable of parsing (user-defined) attributes named "name". | 
|  java.lang.Object | clone()Use copy() if you want to have a deep copy(), i.e., with all references copied correctly. | 
| abstract  Attribute | copy(ConstantPool constant_pool) | 
|  void | dump(java.io.DataOutputStream file)Dump attribute to file stream in binary format. | 
|  ConstantPool | getConstantPool() | 
|  int | getLength() | 
|  int | getNameIndex() | 
|  byte | getTag() | 
| static Attribute | readAttribute(java.io.DataInputStream file,
              ConstantPool constant_pool) | 
| static void | removeAttributeReader(java.lang.String name)Remove attribute reader | 
|  void | setConstantPool(ConstantPool constant_pool) | 
|  void | setLength(int length) | 
|  void | setNameIndex(int name_index) | 
|  java.lang.String | toString() | 
| Methods inherited from class java.lang.Object | 
| equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait | 
| Field Detail | 
protected int name_index
protected int length
protected byte tag
protected ConstantPool constant_pool
| Constructor Detail | 
protected Attribute(byte tag,
                    int name_index,
                    int length,
                    ConstantPool constant_pool)
| Method Detail | 
public abstract void accept(Visitor v)
accept in interface Nodev - Visitor object
public void dump(java.io.DataOutputStream file)
          throws java.io.IOException
file - Output file stream
java.io.IOException
public static void addAttributeReader(java.lang.String name,
                                      AttributeReader r)
name - the name of the attribute as stored in the class filer - the reader objectpublic static void removeAttributeReader(java.lang.String name)
name - the name of the attribute as stored in the class file
public static final Attribute readAttribute(java.io.DataInputStream file,
                                            ConstantPool constant_pool)
                                     throws java.io.IOException,
                                            ClassFormatException
java.io.IOException
ClassFormatExceptionpublic final int getLength()
public final void setLength(int length)
public final void setNameIndex(int name_index)
name_index - of attribute.public final int getNameIndex()
public final byte getTag()
public final ConstantPool getConstantPool()
ConstantPoolpublic final void setConstantPool(ConstantPool constant_pool)
constant_pool - Constant pool to be used for this object.ConstantPoolpublic java.lang.Object clone()
clone in class java.lang.Objectpublic abstract Attribute copy(ConstantPool constant_pool)
public java.lang.String toString()
toString in class java.lang.Object| 
 | |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||