Code, ConstantValue, Exceptions, GenericAttribute, LineNumberTable, LocalVariableTablepublic abstract class Attribute
extends java.lang.Object
Code,
ConstantValue,
Exceptions| Modifier and Type | Field | Description |
|---|---|---|
protected int |
length |
|
protected int |
nameIndex |
| Constructor | Description |
|---|---|
Attribute(int nameIndex,
int length) |
Constructor.
|
| Modifier and Type | Method | Description |
|---|---|---|
java.lang.Object |
clone() |
|
int |
length() |
Returns the length of the attribute, excluding the header.
|
int |
nameIndex() |
Returns the index into the constant pool of the name of the attribute.
|
java.lang.String |
toString() |
Returns a string representation of the attribute.
|
abstract void |
writeData(java.io.DataOutputStream out) |
Write the attribute to a data stream.
|
public Attribute(int nameIndex,
int length)
nameIndex - The index into the constant pool of the name of the attribute.length - The length of the attribute, excluding the header.public abstract void writeData(java.io.DataOutputStream out)
throws java.io.IOException
out - The data stream of the class file.java.io.IOExceptionpublic java.lang.String toString()
toString in class java.lang.Objectpublic int nameIndex()
public int length()
public java.lang.Object clone()
clone in class java.lang.Object