Top Description Fields Constructors Methods
javassist.bytecode.annotation

public Class ClassMemberValue

extends MemberValue
Class Inheritance
Imports
java.io.IOException, java.lang.reflect.Method, java.util.Map, javassist.ClassPool, javassist.bytecode.BadBytecode, .ConstPool, .Descriptor, .SignatureAttribute

Class value.
Authors
Bill Burke, Shigeru Chiba

Field Summary

Modifier and TypeField and Description
pack-priv int
Inherited from javassist.bytecode.annotation.MemberValue:
cptag

Constructor Summary

AccessConstructor and Description
public
ClassMemberValue(int
the index of a CONSTANT_Utf8_info structure.
index
,
ConstPool cp)

Constructs a class value.

public
ClassMemberValue(String
the initial value.
className
,
ConstPool cp)

Constructs a class value.

public
ClassMemberValue(ConstPool cp)

Constructs a class value.

Method Summary

Modifier and TypeMethod and Description
public void
accept(MemberValueVisitor visitor)

Implements abstract javassist.bytecode.annotation.MemberValue.accept.

Accepts a visitor.

pack-priv Class<?>
pack-priv Object
public String

Returns:

fully-qualified class name.
getValue
()

Obtains the value of the member.

public void
public void
public void
setValue(String
fully-qualified class name.
newClassName
)

Sets the value of the member.

public String
toString()

Overrides java.lang.Object.toString.

Obtains the string representation of this object.

public void
write(AnnotationsWriter writer)

Implements abstract javassist.bytecode.annotation.MemberValue.write.

Writes the value.

Inherited from javassist.bytecode.annotation.MemberValue:
loadClass

Field Detail

valueIndexback to summary
pack-priv int valueIndex

Constructor Detail

ClassMemberValueback to summary
public ClassMemberValue(int index, ConstPool cp)

Constructs a class value. The initial value is specified by the constant pool entry at the given index.

Parameters
index:int

the index of a CONSTANT_Utf8_info structure.

ClassMemberValueback to summary
public ClassMemberValue(String className, ConstPool cp)

Constructs a class value.

Parameters
className:String

the initial value.

ClassMemberValueback to summary
public ClassMemberValue(ConstPool cp)

Constructs a class value. The initial value is java.lang.Class.

Method Detail

acceptback to summary
public void accept(MemberValueVisitor visitor)

Implements abstract javassist.bytecode.annotation.MemberValue.accept.

Accepts a visitor.

Annotations
@Override
getTypeback to summary
pack-priv Class<?> getType(ClassLoader cl) throws ClassNotFoundException

Implements abstract javassist.bytecode.annotation.MemberValue.getType.

Annotations
@Override
getValueback to summary
pack-priv Object getValue(ClassLoader cl, ClassPool cp, Method m) throws ClassNotFoundException

Implements abstract javassist.bytecode.annotation.MemberValue.getValue.

Doc from javassist.bytecode.annotation.MemberValue.getValue.

Returns the value. If the value type is a primitive type, the returned value is boxed.

Annotations
@Override
getValueback to summary
public String getValue()

Obtains the value of the member.

Returns:String

fully-qualified class name.

renameClassback to summary
public void renameClass(String oldname, String newname)

Overrides javassist.bytecode.annotation.MemberValue.renameClass.

Annotations
@Override
renameClassback to summary
public void renameClass(Map<String, String> classnames)

Overrides javassist.bytecode.annotation.MemberValue.renameClass.

Annotations
@Override
setValueback to summary
public void setValue(String newClassName)

Sets the value of the member.

Parameters
newClassName:String

fully-qualified class name.

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Obtains the string representation of this object.

Returns:String

Doc from java.lang.Object.toString.

a string representation of the object

Annotations
@Override
writeback to summary
public void write(AnnotationsWriter writer) throws IOException

Implements abstract javassist.bytecode.annotation.MemberValue.write.

Writes the value.

Annotations
@Override