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.
|
loadClass
public 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
MemberValue
getValue
in class MemberValue
java.lang.ClassNotFoundException
java.lang.Class getType(java.lang.ClassLoader cl) throws java.lang.ClassNotFoundException
getType
in class MemberValue
java.lang.ClassNotFoundException
public 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.Object
public void write(AnnotationsWriter writer) throws java.io.IOException
write
in class MemberValue
java.io.IOException
public void accept(MemberValueVisitor visitor)
accept
in class MemberValue