|
||||||||||
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 String |
name
|
private static 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,
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(DataOutputStream file)
Dump unknown bytes to file stream. |
byte[] |
getBytes()
|
String |
getName()
|
(package private) static Unknown[] |
getUnknownAttributes()
|
void |
setBytes(byte[] bytes)
|
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 String name
private static 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, DataInputStream file, ConstantPool constant_pool) throws IOException
name_index
- Index in constant poollength
- Content length in bytesfile
- Input streamconstant_pool
- Array of constants
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(DataOutputStream file) throws IOException
dump
in class Attribute
file
- Output file stream
IOException
public final byte[] getBytes()
public final String getName()
public final void setBytes(byte[] bytes)
bytes
- the bytes to setpublic final 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 |