org.apache.jdo.impl.enhancer.classfile
Class AttributeVector

java.lang.Object
  extended byorg.apache.jdo.impl.enhancer.classfile.AttributeVector

public class AttributeVector
extends java.lang.Object

A list of attributes within a class file. These lists occur in several places within a class file - at class level - at method level - at field level - at attribute level


Field Summary
private  ClassAttribute[] attributes
           
 
Constructor Summary
AttributeVector()
          Construct an empty AttributeVector
 
Method Summary
 void addElement(ClassAttribute attr)
          Add an element to the vector
private  ClassAttribute attrAt(int i)
          Returns the i'th attribute in the array
 java.util.Enumeration elements()
           
 ClassAttribute findAttribute(java.lang.String attrName)
          Look for an attribute of a specific name
 boolean isEqual(java.util.Stack msg, java.lang.Object obj)
          Compares this instance with another for structural equality.
(package private)  void print(java.io.PrintStream out, int indent)
          Print a description of the attributes
(package private) static AttributeVector readAttributes(java.io.DataInputStream data, CodeEnv codeEnv)
          ClassMethod attribute reader
(package private) static AttributeVector readAttributes(java.io.DataInputStream data, ConstantPool constantPool)
          General attribute reader
(package private)  void summarize(java.io.PrintStream out, int indent)
          Print a brief summary of the attributes
(package private)  void write(java.io.DataOutputStream out)
          Write the attributes to the output stream
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

attributes

private ClassAttribute[] attributes
Constructor Detail

AttributeVector

public AttributeVector()
Construct an empty AttributeVector

Method Detail

attrAt

private ClassAttribute attrAt(int i)
Returns the i'th attribute in the array


addElement

public void addElement(ClassAttribute attr)
Add an element to the vector


elements

public java.util.Enumeration elements()

findAttribute

public ClassAttribute findAttribute(java.lang.String attrName)
Look for an attribute of a specific name


isEqual

public boolean isEqual(java.util.Stack msg,
                       java.lang.Object obj)
Compares this instance with another for structural equality.


readAttributes

static AttributeVector readAttributes(java.io.DataInputStream data,
                                      ConstantPool constantPool)
                               throws java.io.IOException
General attribute reader

Throws:
java.io.IOException

readAttributes

static AttributeVector readAttributes(java.io.DataInputStream data,
                                      CodeEnv codeEnv)
                               throws java.io.IOException
ClassMethod attribute reader

Throws:
java.io.IOException

write

void write(java.io.DataOutputStream out)
     throws java.io.IOException
Write the attributes to the output stream

Throws:
java.io.IOException

print

void print(java.io.PrintStream out,
           int indent)
Print a description of the attributes


summarize

void summarize(java.io.PrintStream out,
               int indent)
Print a brief summary of the attributes