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
constant_pool, EMPTY_ARRAY, length, name_index, tag
Constructor and Description |
---|
Unknown(int nameIndex,
int length,
byte[] bytes,
ConstantPool constantPool)
Constructs a new instance for a non-standard attribute.
|
Unknown(Unknown unknown)
Constructs a new instance from another instance.
|
Modifier and Type | Method and Description |
---|---|
void |
accept(Visitor v)
Called by objects that are traversing the nodes of the tree implicitly defined by the contents of a Java class.
|
Attribute |
copy(ConstantPool constantPool) |
void |
dump(DataOutputStream file)
Dumps unknown bytes to file stream.
|
byte[] |
getBytes() |
String |
getName() |
void |
setBytes(byte[] bytes) |
String |
toString() |
addAttributeReader, addAttributeReader, clone, getConstantPool, getLength, getNameIndex, getTag, println, readAttribute, readAttribute, removeAttributeReader, setConstantPool, setLength, setNameIndex
public Unknown(int nameIndex, int length, byte[] bytes, ConstantPool constantPool)
nameIndex
- Index in constant poollength
- Content length in bytesbytes
- Attribute contentsconstantPool
- Array of constantspublic Unknown(Unknown unknown)
unknown
- Source.public void accept(Visitor v)
public Attribute copy(ConstantPool constantPool)
public void dump(DataOutputStream file) throws IOException
dump
in class Attribute
file
- Output file streamIOException
- if an I/O error occurs.public byte[] getBytes()
public void setBytes(byte[] bytes)
bytes
- the bytes to setCopyright © 2004–2024 The Apache Software Foundation. All rights reserved.