public class EnumMemberValue extends MemberValue
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.
|
java.lang.String |
getValue()
Obtains the name of the enum constant 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.
|
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)
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
Javassist, a Java-bytecode translator toolkit.
Copyright (C) 1999- Shigeru Chiba. All Rights Reserved.