Top Description Fields Constructors Methods
javassist.bytecode.annotation

public Class EnumMemberValue

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

Enum constant value.
Authors
Bill Burke, Shigeru Chiba

Field Summary

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

Constructor Summary

AccessConstructor and Description
public
EnumMemberValue(int
the index of a CONSTANT_Utf8_info structure representing the enum type.
type
,
int
the index of a CONSTANT_Utf8_info structure. representing the enum value.
value
,
ConstPool cp)

Constructs an enum constant value.

public
EnumMemberValue(ConstPool cp)

Constructs an enum constant 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<?>
public String

Returns:

a fully-qualified type name.
getType
()

Obtains the enum type name.

pack-priv Object
public String
getValue()

Obtains the name of the enum constant value.

public void
public void
public void
setType(String
a fully-qualified type name.
typename
)

Changes the enum type name.

public void
setValue(String name)

Changes the name of the enum constant value.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the 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

typeIndexback to summary
pack-priv int typeIndex
valueIndexback to summary
pack-priv int valueIndex

Constructor Detail

EnumMemberValueback to summary
public EnumMemberValue(int type, int value, ConstPool cp)

Constructs an enum constant value. The initial value is specified by the constant pool entries at the given indexes.

Parameters
type:int

the index of a CONSTANT_Utf8_info structure representing the enum type.

value:int

the index of a CONSTANT_Utf8_info structure. representing the enum value.

EnumMemberValueback to summary
public EnumMemberValue(ConstPool cp)

Constructs an enum constant value. The initial value is not specified.

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
getTypeback to summary
public String getType()

Obtains the enum type name.

Returns:String

a fully-qualified type name.

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 name of the enum constant value.

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
setTypeback to summary
public void setType(String typename)

Changes the enum type name.

Parameters
typename:String

a fully-qualified type name.

setValueback to summary
public void setValue(String name)

Changes the name of the enum constant value.

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

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