Package EDU.purdue.cs.bloat.file
Class ConstantValue
- java.lang.Object
-
- EDU.purdue.cs.bloat.file.Attribute
-
- EDU.purdue.cs.bloat.file.ConstantValue
-
-
Constructor Summary
Constructors Constructor Description ConstantValue(java.io.DataInputStream in, int nameIndex, int length)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Objectclone()intconstantValueIndex()Returns the index into the constant pool of the constant value.voidsetConstantValueIndex(int index)Set the index into the constant pool of the constant value.java.lang.StringtoString()Converts the attribute to a string.voidwriteData(java.io.DataOutputStream out)Write the attribute to a data stream.
-
-
-
Constructor Detail
-
ConstantValue
public ConstantValue(java.io.DataInputStream in, int nameIndex, int length) throws java.io.IOExceptionConstructor. Create a ConstantValue attribute from a data stream.- Parameters:
in- The data stream of the class file.nameIndex- The index into the constant pool of the name of the attribute.length- The length of the attribute, excluding the header.- Throws:
java.io.IOException- If an error occurs while reading.
-
-
Method Detail
-
writeData
public void writeData(java.io.DataOutputStream out) throws java.io.IOExceptionWrite the attribute to a data stream.
-
constantValueIndex
public int constantValueIndex()
Returns the index into the constant pool of the constant value.
-
setConstantValueIndex
public void setConstantValueIndex(int index)
Set the index into the constant pool of the constant value.
-
-