public final class Unknown extends Attribute
Attribute.readAttribute(java.io.DataInput, ConstantPool) method.
Applications that need to read in application-specific attributes should create an
UnknownAttributeReader implementation and attach it via
Attribute.addAttributeReader(String, UnknownAttributeReader).Attribute,
UnknownAttributeReader| Modifier and Type | Field and Description |
|---|---|
private byte[] |
bytes |
private java.lang.String |
name |
private static java.util.Map<java.lang.String,Unknown> |
unknown_attributes |
constant_pool, length, name_index, tag| Constructor and Description |
|---|
Unknown(int name_index,
int length,
byte[] bytes,
ConstantPool constant_pool)
Create a non-standard attribute.
|
Unknown(int name_index,
int length,
java.io.DataInput input,
ConstantPool constant_pool)
Construct object from input stream.
|
Unknown(Unknown c)
Initialize from another object.
|
| Modifier and Type | Method and Description |
|---|---|
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() |
addAttributeReader, addAttributeReader, clone, getConstantPool, getLength, getNameIndex, getTag, readAttribute, readAttribute, removeAttributeReader, setConstantPool, setLength, setNameIndexprivate byte[] bytes
private final java.lang.String name
private static final java.util.Map<java.lang.String,Unknown> unknown_attributes
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.DataInput input,
ConstantPool constant_pool)
throws java.io.IOException
name_index - Index in constant poollength - Content length in bytesinput - Input streamconstant_pool - Array of constantsjava.io.IOExceptionstatic Unknown[] getUnknownAttributes()
public void accept(Visitor v)
public final void dump(java.io.DataOutputStream file)
throws 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()
public Attribute copy(ConstantPool _constant_pool)