javassist.bytecode.annotation

Class EnumMemberValue

public class EnumMemberValue extends MemberValue

Enum constant value.

Author: Bill Burke Shigeru Chiba

Constructor Summary
EnumMemberValue(int type, int value, ConstPool cp)
Constructs an enum constant value.
EnumMemberValue(ConstPool cp)
Constructs an enum constant value.
Method Summary
voidaccept(MemberValueVisitor visitor)
Accepts a visitor.
StringgetType()
Obtains the enum type name.
StringgetValue()
Obtains the name of the enum constant value.
voidsetType(String typename)
Changes the enum type name.
voidsetValue(String name)
Changes the name of the enum constant value.
StringtoString()
voidwrite(AnnotationsWriter writer)
Writes the value.

Constructor Detail

EnumMemberValue

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 the index of a CONSTANT_Utf8_info structure representing the enum type. value the index of a CONSTANT_Utf8_info structure. representing the enum value.

EnumMemberValue

public EnumMemberValue(ConstPool cp)
Constructs an enum constant value. The initial value is not specified.

Method Detail

accept

public void accept(MemberValueVisitor visitor)
Accepts a visitor.

getType

public String getType()
Obtains the enum type name.

Returns: a fully-qualified type name.

getValue

public String getValue()
Obtains the name of the enum constant value.

setType

public void setType(String typename)
Changes the enum type name.

Parameters: typename a fully-qualified type name.

setValue

public void setValue(String name)
Changes the name of the enum constant value.

toString

public String toString()

write

public void write(AnnotationsWriter writer)
Writes the value.
Javassist, a Java-bytecode translator toolkit.
Copyright (C) 1999-2006 Shigeru Chiba. All Rights Reserved.