# Class SimpleElementValue

java.lang.Object
org.apache.tomcat.util.bcel.classfile.ElementValue
org.apache.tomcat.util.bcel.classfile.SimpleElementValue

public class SimpleElementValue extends ElementValue
Represents a simple element value in an annotation, where the value is a primitive type or String referenced by an index in the constant pool.

## Field Summary

### Fields inherited from class ElementValue

`ANNOTATION, ARRAY, CLASS, ENUM_CONSTANT, PRIMITIVE_BOOLEAN, PRIMITIVE_BYTE, PRIMITIVE_CHAR, PRIMITIVE_DOUBLE, PRIMITIVE_FLOAT, PRIMITIVE_INT, PRIMITIVE_LONG, PRIMITIVE_SHORT, STRING`

## Method Summary

Modifier and Type
Method
Description
`int`
`getIndex()`
Returns the constant pool index of this element value.
`String`
`stringifyValue()`
Returns the string representation of this element value based on its type.

### Methods inherited from class ElementValue

`readElementValue, readElementValue`

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Method Details

### getIndex

public int getIndex()
Returns the constant pool index of this element value.

Returns:
  the constant pool index

### stringifyValue

public String stringifyValue()
Returns the string representation of this element value based on its type.

Specified by:
  `stringifyValue` in class `ElementValue`
Returns:
  the string representation of the value