Package javassist.bytecode.annotation
Class ArrayMemberValue
- java.lang.Object
-
- javassist.bytecode.annotation.MemberValue
-
- javassist.bytecode.annotation.ArrayMemberValue
-
public class ArrayMemberValue extends MemberValue
Array member.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) MemberValue
type
(package private) MemberValue[]
values
-
Fields inherited from class javassist.bytecode.annotation.MemberValue
cp, tag
-
-
Constructor Summary
Constructors Constructor Description ArrayMemberValue(MemberValue t, ConstPool cp)
Constructs an array.ArrayMemberValue(ConstPool cp)
Constructs an array.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
accept(MemberValueVisitor visitor)
Accepts a visitor.MemberValue
getType()
Obtains the type of the elements.(package private) java.lang.Class<?>
getType(java.lang.ClassLoader cl)
MemberValue[]
getValue()
Obtains the elements of the array.(package private) java.lang.Object
getValue(java.lang.ClassLoader cl, ClassPool cp, java.lang.reflect.Method method)
Returns the value.void
renameClass(java.lang.String oldname, java.lang.String newname)
void
renameClass(java.util.Map<java.lang.String,java.lang.String> classnames)
void
setValue(MemberValue[] elements)
Sets the elements of the array.java.lang.String
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 Detail
-
type
MemberValue type
-
values
MemberValue[] values
-
-
Constructor Detail
-
ArrayMemberValue
public ArrayMemberValue(ConstPool cp)
Constructs an array. The initial value or type are not specified.
-
ArrayMemberValue
public ArrayMemberValue(MemberValue t, ConstPool cp)
Constructs an array. The initial value is not specified.- Parameters:
t
- the type of the array elements.
-
-
Method Detail
-
getValue
java.lang.Object getValue(java.lang.ClassLoader cl, ClassPool cp, java.lang.reflect.Method method) throws java.lang.ClassNotFoundException
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:
java.lang.ClassNotFoundException
-
getType
java.lang.Class<?> getType(java.lang.ClassLoader cl) throws java.lang.ClassNotFoundException
- Specified by:
getType
in classMemberValue
- Throws:
java.lang.ClassNotFoundException
-
renameClass
public void renameClass(java.lang.String oldname, java.lang.String newname)
- Overrides:
renameClass
in classMemberValue
-
renameClass
public void renameClass(java.util.Map<java.lang.String,java.lang.String> classnames)
- Overrides:
renameClass
in classMemberValue
-
getType
public MemberValue getType()
Obtains the type of the elements.- Returns:
- null if the type is not specified.
-
getValue
public MemberValue[] getValue()
Obtains the elements of the array.
-
setValue
public void setValue(MemberValue[] elements)
Sets the elements of the array.
-
toString
public java.lang.String toString()
Obtains the string representation of this object.- Overrides:
toString
in classjava.lang.Object
-
write
public void write(AnnotationsWriter writer) throws java.io.IOException
Writes the value.- Specified by:
write
in classMemberValue
- Throws:
java.io.IOException
-
accept
public void accept(MemberValueVisitor visitor)
Accepts a visitor.- Specified by:
accept
in classMemberValue
-
-