|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectalt.jiapi.file.attribute.Attribute
public class Attribute
Base class of for attributes in class file. This class holds bytes of the attribute. Complex attributes, like Code attribute will override getBytes() method to support classfile manipulation.
Field Summary | |
---|---|
protected ConstantPool |
cp
|
Constructor Summary | |
---|---|
protected |
Attribute(short nameIndex)
|
protected |
Attribute(short nameIndex,
int length,
java.io.DataInputStream dis)
|
Method Summary | |
---|---|
short |
getAttributeNameIndex()
|
byte[] |
getBytes()
Get the bytes of this attribute. |
protected java.io.DataInputStream |
getDataInputStream()
Gets a DatainputStream that reads internal byte[] |
java.lang.String |
getName()
Get the name of this Attribute |
static Attribute |
readAttribute(ConstantPool constantPool,
java.io.DataInputStream dis)
Factory method for creating Attributes from given DataInputStream. |
void |
setConstantPool(ConstantPool cp)
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected ConstantPool cp
Constructor Detail |
---|
protected Attribute(short nameIndex)
protected Attribute(short nameIndex, int length, java.io.DataInputStream dis) throws java.io.IOException
java.io.IOException
Method Detail |
---|
public short getAttributeNameIndex()
public byte[] getBytes()
protected java.io.DataInputStream getDataInputStream()
public java.lang.String getName()
public static Attribute readAttribute(ConstantPool constantPool, java.io.DataInputStream dis) throws java.io.IOException
constantPool
- dis
-
java.io.IOException
public void setConstantPool(ConstantPool cp)
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 |