org.fife.rsta.ac.java.classreader.attributes
Class ConstantValue

java.lang.Object
  extended by org.fife.rsta.ac.java.classreader.attributes.AttributeInfo
      extended by org.fife.rsta.ac.java.classreader.attributes.ConstantValue

public class ConstantValue
extends AttributeInfo

The "ConstantValue" attribute, as defined by 4.7.2 of the JVM specification.

Version:
1.0
Author:
Robert Futrell

Field Summary
 
Fields inherited from class org.fife.rsta.ac.java.classreader.attributes.AttributeInfo
attributeNameIndex
 
Constructor Summary
ConstantValue(ClassFile cf, int constantValueIndex)
          CConstructor.
 
Method Summary
 String getConstantValueAsString()
          Returns the constant's value, as a string.
 int getConstantValueIndex()
          Returns the index into the constant pool that gives the constant value represented by this attribute.
 
Methods inherited from class org.fife.rsta.ac.java.classreader.attributes.AttributeInfo
getClassFile, getName, readUnsupportedAttribute, skipBytes
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConstantValue

public ConstantValue(ClassFile cf,
                     int constantValueIndex)
CConstructor.

Parameters:
cf - The class file.
constantValueIndex - The index into the constant pool that gives the constant value represented by this attribute.
Method Detail

getConstantValueIndex

public int getConstantValueIndex()
Returns the index into the constant pool that gives the constant value represented by this attribute.

Returns:
The index.

getConstantValueAsString

public String getConstantValueAsString()
Returns the constant's value, as a string.

Returns:
The constant's value, as a string.


Copyright © 2003-2011. All Rights Reserved.