public abstract class Attribute extends Object implements AnnotationValue
This is NOT part of any supported API. If you write code that depends on this, you do so at your own risk. This code and its internal interfaces are subject to change or deletion without notice.
Modifier and Type | Class and Description |
---|---|
static class |
Attribute.Array
The value for an annotation element of an array type.
|
static class |
Attribute.Class
The value for an annotation element of type java.lang.Class,
represented as a ClassSymbol.
|
static class |
Attribute.Compound
A compound annotation element value, the type of which is an
attribute interface.
|
static class |
Attribute.Constant
The value for an annotation element of primitive type or String.
|
static class |
Attribute.Enum
The value for an annotation element of an enum type.
|
static class |
Attribute.Error |
static class |
Attribute.RetentionPolicy
A mirror of java.lang.annotation.RetentionPolicy.
|
static class |
Attribute.TypeCompound |
static class |
Attribute.UnresolvedClass |
static interface |
Attribute.Visitor
A visitor type for dynamic dispatch on the kind of attribute value.
|
Modifier and Type | Field and Description |
---|---|
Type |
type
The type of the annotation element.
|
Modifier and Type | Method and Description |
---|---|
<R,P> R |
accept(AnnotationValueVisitor<R,P> v,
P p)
Applies a visitor to this value.
|
abstract void |
accept(Attribute.Visitor v) |
TypeAnnotationPosition |
getPosition() |
Object |
getValue()
Returns the value.
|
boolean |
isSynthesized() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
toString
public Type type
public Attribute(Type type)
public abstract void accept(Attribute.Visitor v)
public Object getValue()
AnnotationValue
getValue
in interface AnnotationValue
public <R,P> R accept(AnnotationValueVisitor<R,P> v, P p)
AnnotationValue
accept
in interface AnnotationValue
R
- the return type of the visitor's methodsP
- the type of the additional parameter to the visitor's methodsv
- the visitor operating on this valuep
- additional parameter to the visitorpublic boolean isSynthesized()
public TypeAnnotationPosition getPosition()
Copyright © 2015. All rights reserved.