public class Annotation extends java.lang.Object implements AnnotationValue, java.io.Serializable
Modifier and Type | Field and Description |
---|---|
private AbstractBaseJavaEntity |
context |
private int |
lineNumber |
private java.util.Map |
namedParameters
Annotation properties as Parameters
|
private java.util.Map |
properties
Annotation properties as AnnotationValues
|
private Type |
type |
Constructor and Description |
---|
Annotation(Type type,
AbstractBaseJavaEntity context,
java.util.Map namedParameters,
int lineNumber) |
Annotation(Type type,
int line) |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
accept(AnnotationVisitor visitor)
Accept a visitor for this value.
|
AbstractBaseJavaEntity |
getContext() |
int |
getLineNumber() |
java.lang.Object |
getNamedParameter(java.lang.String key) |
java.util.Map |
getNamedParameterMap() |
java.lang.Object |
getParameterValue()
Get a parameter value for
getNamedParameter(String) . |
AnnotationValue |
getProperty(java.lang.String name) |
java.util.Map |
getPropertyMap() |
Type |
getType() |
void |
setContext(AbstractBaseJavaEntity context) |
void |
setProperty(java.lang.String name,
AnnotationValue value) |
java.lang.String |
toString() |
private final Type type
private final int lineNumber
private final java.util.Map properties
This map contains the parsed AnnotationValue for each property and allows access to the full parse tree, including typerefs and expressions.
private final java.util.Map namedParameters
private AbstractBaseJavaEntity context
public Annotation(Type type, AbstractBaseJavaEntity context, java.util.Map namedParameters, int lineNumber)
public Annotation(Type type, int line)
public void setProperty(java.lang.String name, AnnotationValue value)
public Type getType()
public java.lang.Object getNamedParameter(java.lang.String key)
key
- name of a named-parameterpublic java.util.Map getNamedParameterMap()
public final AbstractBaseJavaEntity getContext()
public int getLineNumber()
public java.lang.Object accept(AnnotationVisitor visitor)
AnnotationValue
accept
in interface AnnotationValue
visitor
- Visitorpublic java.lang.Object getParameterValue()
AnnotationValue
getNamedParameter(String)
.getParameterValue
in interface AnnotationValue
public java.util.Map getPropertyMap()
public AnnotationValue getProperty(java.lang.String name)
public void setContext(AbstractBaseJavaEntity context)
public java.lang.String toString()
toString
in class java.lang.Object