Package javassist.bytecode.annotation
Class ClassMemberValue
java.lang.Object
javassist.bytecode.annotation.MemberValue
javassist.bytecode.annotation.ClassMemberValue
Class value.
- Author:
- Bill Burke, Shigeru Chiba
-
Constructor Summary
ConstructorDescriptionClassMemberValue
(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.getValue()
Obtains the value of the member.void
renameClass
(String oldname, String newname) void
renameClass
(Map<String, String> classnames) void
Sets the value of the member.toString()
Obtains the string representation of this object.void
write
(AnnotationsWriter writer) Writes the value.
-
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
-
renameClass
- Overrides:
renameClass
in classMemberValue
-
renameClass
- Overrides:
renameClass
in 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:
write
in classMemberValue
- Throws:
IOException
-
accept
Accepts a visitor.- Specified by:
accept
in classMemberValue
-