org.aspectj.apache.bcel.classfile
Class Attribute

java.lang.Object
  extended by org.aspectj.apache.bcel.classfile.Attribute
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, Node
Direct Known Subclasses:
AnnotationDefault, BootstrapMethods, Code, ConstantValue, Deprecated, EnclosingMethod, ExceptionTable, InnerClasses, LineNumberTable, LocalVariableTable, LocalVariableTypeTable, RuntimeAnnos, RuntimeParamAnnos, Signature, SourceFile, StackMap, Synthetic, Unknown

public abstract class Attribute
extends java.lang.Object
implements java.lang.Cloneable, Node, java.io.Serializable

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.

See Also:
ConstantValue, SourceFile, Code, Unknown, ExceptionTable, LineNumberTable, LocalVariableTable, InnerClasses, Synthetic, Deprecated, Signature, Serialized Form

Field Summary
protected  ConstantPool cpool
           
protected  int length
           
protected  int nameIndex
           
static Attribute[] NoAttributes
           
protected  byte tag
           
 
Constructor Summary
protected Attribute(byte tag, int nameIndex, int length, ConstantPool cpool)
           
 
Method Summary
abstract  void accept(ClassVisitor v)
           
 void dump(java.io.DataOutputStream file)
           
 ConstantPool getConstantPool()
           
 int getLength()
           
 java.lang.String getName()
           
 int getNameIndex()
           
 byte getTag()
           
static Attribute readAttribute(java.io.DataInputStream file, ConstantPool cpool)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NoAttributes

public static final Attribute[] NoAttributes

tag

protected byte tag

nameIndex

protected int nameIndex

length

protected int length

cpool

protected ConstantPool cpool
Constructor Detail

Attribute

protected Attribute(byte tag,
                    int nameIndex,
                    int length,
                    ConstantPool cpool)
Method Detail

dump

public void dump(java.io.DataOutputStream file)
          throws java.io.IOException
Throws:
java.io.IOException

readAttribute

public static final Attribute readAttribute(java.io.DataInputStream file,
                                            ConstantPool cpool)
                                     throws java.io.IOException
Throws:
java.io.IOException

getName

public java.lang.String getName()

getLength

public final int getLength()

getNameIndex

public final int getNameIndex()

getTag

public final byte getTag()

getConstantPool

public final ConstantPool getConstantPool()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

accept

public abstract void accept(ClassVisitor v)
Specified by:
accept in interface Node