Package javassist.bytecode.annotation
Class ClassMemberValue
java.lang.Object
javassist.bytecode.annotation.MemberValue
javassist.bytecode.annotation.ClassMemberValue
Class value.
-
Field Summary
FieldsFields inherited from class javassist.bytecode.annotation.MemberValue
cp, tag
-
Constructor Summary
ConstructorsConstructorDescriptionClassMemberValue
(int index, ConstPool cp) Constructs a class value.ClassMemberValue
(String className, ConstPool cp) Constructs a class value.Constructs a class value. -
Method Summary
Modifier and TypeMethodDescriptionvoid
accept
(MemberValueVisitor visitor) Accepts a visitor.(package private) Class<?>
getType
(ClassLoader cl) getValue()
Obtains the value of the member.(package private) Object
getValue
(ClassLoader cl, ClassPool cp, Method m) Returns the value.void
Sets the value of the member.toString()
Obtains the string representation of this object.void
write
(AnnotationsWriter writer) Writes the value.Methods inherited from class javassist.bytecode.annotation.MemberValue
loadClass
-
Field Details
-
valueIndex
int valueIndex
-
-
Constructor Details
-
ClassMemberValue
Constructs a class value. The initial value is specified by the constant pool entry at the given index.- Parameters:
index
- the index of a CONSTANT_Utf8_info structure.
-
ClassMemberValue
Constructs a class value.- Parameters:
className
- the initial value.
-
ClassMemberValue
Constructs a class value. The initial value is java.lang.Class.
-
-
Method Details
-
getValue
Description copied from class:MemberValue
Returns the value. If the value type is a primitive type, the returned value is boxed.- Specified by:
getValue
in classMemberValue
- Throws:
ClassNotFoundException
-
getType
- Specified by:
getType
in classMemberValue
- Throws:
ClassNotFoundException
-
getValue
Obtains the value of the member.- Returns:
- fully-qualified class name.
-
setValue
Sets the value of the member.- Parameters:
newClassName
- fully-qualified class name.
-
toString
Obtains the string representation of this object. -
write
Writes the value.- Specified by:
write
in classMemberValue
- Throws:
IOException
-
accept
Accepts a visitor.- Specified by:
accept
in classMemberValue
-