public class EnumMemberValue extends MemberValue
| Modifier and Type | Field and Description |
|---|---|
(package private) int |
typeIndex |
(package private) int |
valueIndex |
cp, tag| Constructor and Description |
|---|
EnumMemberValue(ConstPool cp)
Constructs an enum constant value.
|
EnumMemberValue(int type,
int value,
ConstPool cp)
Constructs an enum constant value.
|
| Modifier and Type | Method and Description |
|---|---|
void |
accept(MemberValueVisitor visitor)
Accepts a visitor.
|
java.lang.String |
getType()
Obtains the enum type name.
|
(package private) java.lang.Class |
getType(java.lang.ClassLoader cl) |
java.lang.String |
getValue()
Obtains the name of the enum constant value.
|
(package private) java.lang.Object |
getValue(java.lang.ClassLoader cl,
ClassPool cp,
java.lang.reflect.Method m)
Returns the value.
|
void |
setType(java.lang.String typename)
Changes the enum type name.
|
void |
setValue(java.lang.String name)
Changes the name of the enum constant value.
|
java.lang.String |
toString() |
void |
write(AnnotationsWriter writer)
Writes the value.
|
loadClasspublic EnumMemberValue(int type,
int value,
ConstPool cp)
type - the index of a CONSTANT_Utf8_info structure
representing the enum type.value - the index of a CONSTANT_Utf8_info structure.
representing the enum value.public EnumMemberValue(ConstPool cp)
java.lang.Object getValue(java.lang.ClassLoader cl,
ClassPool cp,
java.lang.reflect.Method m)
throws java.lang.ClassNotFoundException
MemberValuegetValue in class MemberValuejava.lang.ClassNotFoundExceptionjava.lang.Class getType(java.lang.ClassLoader cl)
throws java.lang.ClassNotFoundException
getType in class MemberValuejava.lang.ClassNotFoundExceptionpublic java.lang.String getType()
public void setType(java.lang.String typename)
typename - a fully-qualified type name.public java.lang.String getValue()
public void setValue(java.lang.String name)
public java.lang.String toString()
toString in class java.lang.Objectpublic void write(AnnotationsWriter writer) throws java.io.IOException
write in class MemberValuejava.io.IOExceptionpublic void accept(MemberValueVisitor visitor)
accept in class MemberValue