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.ElementValueThe element value associated with this single-element annotation.Fields inherited from class 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()voidsetEnclosingScope(Java.Scope enclosingScope) Sets the enclosing scope for this annotation.toString()Methods inherited from class 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.AnnotationSets the enclosing scope for this annotation.- Specified by:
setEnclosingScopein interfaceJava.Annotation- Specified by:
setEnclosingScopein interfaceJava.ElementValue- Overrides:
setEnclosingScopein 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
-