|
mjc | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.multijava.util.classfile.Attribute
org.multijava.util.classfile.GenericAttribute
This is an opaque attribute that lets you add an uninterpreted stream of bytes into an attribute in a class file. This can be used (for instance) to embed versioning or signatures into the class file or method.
| Field Summary | |
private byte[] |
data
|
private AsciiConstant |
name
|
| Constructor Summary | |
GenericAttribute(java.lang.String name,
byte[] data)
Make up a new attribute |
|
GenericAttribute(AsciiConstant name,
java.io.DataInput in,
ConstantPool cp)
Make up a new attribute |
|
| Method Summary | |
(package private) java.lang.String |
getName()
Returns the attribute's name |
protected int |
getSize()
Returns the space in bytes used by this attribute in the classfile |
protected int |
getTag()
Returns the attribute's tag |
protected void |
resolveConstants(ConstantPool cp)
Insert or check location of constant value on constant pool |
protected void |
write(ConstantPool cp,
java.io.DataOutput out)
Write this class into the the file (out) getting data position from the constant pool |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private AsciiConstant name
private byte[] data
| Constructor Detail |
public GenericAttribute(java.lang.String name,
byte[] data)
name - Name to be associated with the attributedata - stream of bytes to be placed with the attribute
public GenericAttribute(AsciiConstant name,
java.io.DataInput in,
ConstantPool cp)
throws java.io.IOException
name - the attribute's namein - the stream to read fromcp - the constant pool
java.io.IOException - an io problem has occured| Method Detail |
protected int getTag()
protected int getSize()
java.lang.String getName()
protected void resolveConstants(ConstantPool cp)
cp - the constant pool for this class
protected void write(ConstantPool cp,
java.io.DataOutput out)
throws java.io.IOException
cp - the constant pool that contain all dataout - the file where to write this object info
java.io.IOException - an io problem has occured
|
mjc | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||