|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.bcel.classfile.Attribute
org.apache.bcel.classfile.Unknown
public final class Unknown
This class represents a reference to an unknown (i.e., application-specific) attribute of a class. It is instantiated from the Attribute.readAttribute() method. Applications that need to read in application-specific attributes should create an AttributeReader implementation and attach it via Attribute.addAttributeReader.
Attribute
,
AttributeReader
,
Serialized FormField Summary | |
---|---|
private byte[] |
bytes
|
private java.lang.String |
name
|
private static java.util.Map |
unknown_attributes
|
Fields inherited from class org.apache.bcel.classfile.Attribute |
---|
constant_pool, length, name_index, tag |
Constructor Summary | |
---|---|
Unknown(int name_index,
int length,
byte[] bytes,
ConstantPool constant_pool)
Create a non-standard attribute. |
|
Unknown(int name_index,
int length,
java.io.DataInputStream file,
ConstantPool constant_pool)
Construct object from file stream. |
|
Unknown(Unknown c)
Initialize from another object. |
Method Summary | |
---|---|
void |
accept(Visitor v)
Called by objects that are traversing the nodes of the tree implicitely defined by the contents of a Java class. |
Attribute |
copy(ConstantPool _constant_pool)
|
void |
dump(java.io.DataOutputStream file)
Dump unknown bytes to file stream. |
byte[] |
getBytes()
|
java.lang.String |
getName()
|
(package private) static Unknown[] |
getUnknownAttributes()
|
void |
setBytes(byte[] bytes)
|
java.lang.String |
toString()
|
Methods inherited from class org.apache.bcel.classfile.Attribute |
---|
addAttributeReader, clone, getConstantPool, getLength, getNameIndex, getTag, readAttribute, removeAttributeReader, setConstantPool, setLength, setNameIndex |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private byte[] bytes
private java.lang.String name
private static java.util.Map unknown_attributes
Constructor Detail |
---|
public Unknown(Unknown c)
public Unknown(int name_index, int length, byte[] bytes, ConstantPool constant_pool)
name_index
- Index in constant poollength
- Content length in bytesbytes
- Attribute contentsconstant_pool
- Array of constantsUnknown(int name_index, int length, java.io.DataInputStream file, ConstantPool constant_pool) throws java.io.IOException
name_index
- Index in constant poollength
- Content length in bytesfile
- Input streamconstant_pool
- Array of constants
java.io.IOException
Method Detail |
---|
static Unknown[] getUnknownAttributes()
public void accept(Visitor v)
accept
in interface Node
accept
in class Attribute
v
- Visitor objectpublic final void dump(java.io.DataOutputStream file) throws java.io.IOException
dump
in class Attribute
file
- Output file stream
java.io.IOException
public final byte[] getBytes()
public final java.lang.String getName()
public final void setBytes(byte[] bytes)
bytes
- the bytes to setpublic final java.lang.String toString()
toString
in class Attribute
public Attribute copy(ConstantPool _constant_pool)
copy
in class Attribute
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |