Package javassist.bytecode.annotation
Class EnumMemberValue
java.lang.Object
javassist.bytecode.annotation.MemberValue
javassist.bytecode.annotation.EnumMemberValue
Enum constant value.
- Author:
- Bill Burke, Shigeru Chiba
-
Constructor Summary
ConstructorDescriptionEnumMemberValue
(int type, int value, ConstPool cp) Constructs an enum constant value.Constructs an enum constant value. -
Method Summary
Modifier and TypeMethodDescriptionvoid
accept
(MemberValueVisitor visitor) Accepts a visitor.getType()
Obtains the enum type name.getValue()
Obtains the name of the enum constant value.void
renameClass
(String oldname, String newname) void
renameClass
(Map<String, String> classnames) void
Changes the enum type name.void
Changes the name of the enum constant value.toString()
void
write
(AnnotationsWriter writer) Writes the value.
-
Constructor Details
-
EnumMemberValue
Constructs an enum constant value. The initial value is specified by the constant pool entries at the given indexes.- Parameters:
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.
-
EnumMemberValue
Constructs an enum constant value. The initial value is not specified.
-
-
Method Details
-
renameClass
- Overrides:
renameClass
in classMemberValue
-
renameClass
- Overrides:
renameClass
in classMemberValue
-
getType
Obtains the enum type name.- Returns:
- a fully-qualified type name.
-
setType
Changes the enum type name.- Parameters:
typename
- a fully-qualified type name.
-
getValue
Obtains the name of the enum constant value. -
setValue
Changes the name of the enum constant value. -
toString
-
write
Writes the value.- Specified by:
write
in classMemberValue
- Throws:
IOException
-
accept
Accepts a visitor.- Specified by:
accept
in classMemberValue
-