com.objectwave.classFile
Class AttributeInfo
java.lang.Object
|
+--com.objectwave.classFile.AttributeInfo
- Direct Known Subclasses:
- BuggyLocalVariableAttributeInfo, CodeAttributeInfo, ConstantValueAttributeInfo, ExceptionAttributeInfo, LocalVariableAttributeInfo
- public class AttributeInfo
- extends java.lang.Object
This class defines the generic Attribute type for Java class files. It is a
little bit smart in that for some Attributes it can display them
intelligently if it also has access to the constant pool of the current
class.
- Version:
- $Id: AttributeInfo.java,v 2.0 2001/06/11 15:46:52 dave_hoag Exp $
- Author:
- Dave Hoag
- See Also:
ClassFile
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
AttributeInfo
public AttributeInfo()
AttributeInfo
public AttributeInfo(ConstantPoolInfo newName,
byte[] newData)
- Parameters:
newName
- newData
-
read
public boolean read(java.io.DataInputStream di,
ConstantPoolInfo[] pool)
throws java.io.IOException
- Parameters:
di
- pool
-
- Returns:
-
- Throws:
java.io.IOException
toBoolean
public java.lang.String toBoolean(ConstantPoolInfo[] pool)
- Parameters:
pool
-
- Returns:
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
- Returns:
toString
public java.lang.String toString(ConstantPoolInfo[] pool)
- Print out an 'intelligent' version of this class. The constant pool
contains the necessary information.
- Parameters:
pool
-
- Returns:
write
public void write(java.io.DataOutputStream dos,
ConstantPoolInfo[] pool)
throws java.io.IOException,
java.lang.Exception
- Write the bytes to the output stream.
- Parameters:
dos
- The DataOutputStream upon which this is writingpool
- The constant pool in which to index.
- Throws:
java.io.IOException
java.lang.Exception
fixUpConstants
protected void fixUpConstants(ClassFile target,
ConstantPoolInfo[] originalPool)
throws java.lang.Exception
- Parameters:
target
- originalPool
-
- Throws:
java.lang.Exception