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 TypeMethodDescriptionvoidaccept(MemberValueVisitor visitor) Accepts a visitor.(package private) Class<?>getType(ClassLoader cl) getValue()Obtains the value of the member.(package private) ObjectgetValue(ClassLoader cl, ClassPool cp, Method m) Returns the value.voidrenameClass(String oldname, String newname) voidrenameClass(Map<String, String> classnames) voidSets the value of the member.toString()Obtains the string representation of this object.voidwrite(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: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
-
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:
writein classMemberValue- Throws:
IOException
-
accept
Accepts a visitor.- Specified by:
acceptin classMemberValue
-