Package javassist.bytecode.annotation

# Class AnnotationMemberValue

java.lang.Object
javassist.bytecode.annotation.MemberValue
javassist.bytecode.annotation.AnnotationMemberValue

public class AnnotationMemberValue extends MemberValue
Nested annotation.

Author:
  Bill Burke, Shigeru Chiba

## Constructor Summary

Constructors
Constructor
Description
`AnnotationMemberValue(Annotation a, ConstPool cp)`
Constructs an annotation member.
`AnnotationMemberValue(ConstPool cp)`
Constructs an annotation member.

## Method Summary

Modifier and Type
Method
Description
`void`
`accept(MemberValueVisitor visitor)`
Accepts a visitor.
`Annotation`
`getValue()`
Obtains the value.
`void`
`setValue(Annotation newValue)`
Sets the value of this member.
`String`
`toString()`
Obtains the string representation of this object.
`void`
`write(AnnotationsWriter writer)`
Writes the value.

### Methods inherited from class java.lang.Object

`equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

## Constructor Details

### AnnotationMemberValue

public AnnotationMemberValue(ConstPool cp)
Constructs an annotation member. The initial value is not specified.

### AnnotationMemberValue

public AnnotationMemberValue(Annotation a, ConstPool cp)
Constructs an annotation member. The initial value is specified by the first parameter.

## Method Details

### getValue

public Annotation getValue()
Obtains the value.

### setValue

public void setValue(Annotation newValue)
Sets the value of this member.

### toString

public String toString()
Obtains the string representation of this object.

Overrides:
  `toString` in class `Object`

### write

public void write(AnnotationsWriter writer) throws IOException
Writes the value.

Specified by:
  `write` in class `MemberValue`
Throws:
  `IOException`

### accept

public void accept(MemberValueVisitor visitor)
Accepts a visitor.

Specified by:
  `accept` in class `MemberValue`