public final class ConstantArgument extends Argument implements WritableData
| Modifier and Type | Field and Description |
|---|---|
private Constant |
constant
Constant represented by this argument
|
| Constructor and Description |
|---|
ConstantArgument(Constant constant)
This constructor assumes a constant pool index width of two bytes,
which is the norm for most opcodes.
|
ConstantArgument(Constant constant,
int width)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
toString() |
void |
write(java.io.DataOutput out)
This method writes this argument's data to the specified output
stream.
|
private Constant constant
public ConstantArgument(Constant constant)
constant - Constant object whose constant pool index will comprise
the data of this instruction argument.public ConstantArgument(Constant constant, int width)
constant - Constant object whose constant pool index will comprise
the data of this instruction argument.width - Width of this argument's data, in bytes.public void write(java.io.DataOutput out)
throws java.io.IOException
write in interface WritableDataout - Data output stream to which to write argument data.java.io.IOException - if any error occurs while writing.public java.lang.String toString()
toString in class java.lang.Object