Package org.codehaus.janino
Class Java.SingleElementAnnotation
java.lang.Object
org.codehaus.janino.Java.AbstractAnnotation
org.codehaus.janino.Java.SingleElementAnnotation
- All Implemented Interfaces:
Java.Annotation
,Java.ElementValue
,Java.Locatable
,Java.Modifier
- Enclosing class:
Java
Representation of a "single-element annotation", i.e. an annotation followed by a single element in parentheses.
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal Java.ElementValue
The element value associated with this single-element annotation.Fields inherited from class org.codehaus.janino.Java.AbstractAnnotation
type
-
Constructor Summary
ConstructorsConstructorDescriptionSingleElementAnnotation
(Java.ReferenceType type, Java.ElementValue elementValue) -
Method Summary
Modifier and TypeMethodDescription<R,
EX extends Throwable>
Raccept
(Visitor.AnnotationVisitor<R, EX> visitor) getType()
void
setEnclosingScope
(Java.Scope enclosingScope) Sets the enclosing scope for this annotation.toString()
Methods inherited from class org.codehaus.janino.Java.AbstractAnnotation
accept, accept, getLocation, throwCompileException
-
Field Details
-
elementValue
The element value associated with this single-element annotation.
-
-
Constructor Details
-
SingleElementAnnotation
-
-
Method Details
-
setEnclosingScope
Description copied from interface:Java.Annotation
Sets the enclosing scope for this annotation.- Specified by:
setEnclosingScope
in interfaceJava.Annotation
- Specified by:
setEnclosingScope
in interfaceJava.ElementValue
- Overrides:
setEnclosingScope
in classJava.AbstractAnnotation
-
toString
-
getType
- Returns:
- The type of this annotation
-
accept
@Nullable public <R,EX extends Throwable> R accept(Visitor.AnnotationVisitor<R, EX> visitor) throws EXDescription copied from interface:Java.Annotation
- Throws:
EX
-