Package javassist.bytecode.annotation
Class EnumMemberValue
java.lang.Object
javassist.bytecode.annotation.MemberValue
javassist.bytecode.annotation.EnumMemberValue
Enum constant value.
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) int(package private) intFields inherited from class javassist.bytecode.annotation.MemberValue
cp, tag -
Constructor Summary
ConstructorsConstructorDescriptionEnumMemberValue(int type, int value, ConstPool cp) Constructs an enum constant value.Constructs an enum constant value. -
Method Summary
Modifier and TypeMethodDescriptionvoidaccept(MemberValueVisitor visitor) Accepts a visitor.getType()Obtains the enum type name.(package private) Class<?>getType(ClassLoader cl) getValue()Obtains the name of the enum constant value.(package private) ObjectgetValue(ClassLoader cl, ClassPool cp, Method m) Returns the value.voidrenameClass(String oldname, String newname) voidrenameClass(Map<String, String> classnames) voidChanges the enum type name.voidChanges the name of the enum constant value.toString()voidwrite(AnnotationsWriter writer) Writes the value.Methods inherited from class javassist.bytecode.annotation.MemberValue
loadClass
-
Field Details
-
typeIndex
int typeIndex -
valueIndex
int valueIndex
-
-
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
-
getValue
Description copied from class:MemberValueReturns the value. If the value type is a primitive type, the returned value is boxed.- Specified by:
getValuein classMemberValue- Throws:
ClassNotFoundException
-
getType
- Specified by:
getTypein classMemberValue- Throws:
ClassNotFoundException
-
renameClass
- Overrides:
renameClassin classMemberValue
-
renameClass
- Overrides:
renameClassin 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:
writein classMemberValue- Throws:
IOException
-
accept
Accepts a visitor.- Specified by:
acceptin classMemberValue
-