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
public static final class Java.SingleElementAnnotation extends Java.AbstractAnnotation
Representation of a "single-element annotation", i.e. an annotation followed by a single element in parentheses.
-
-
Field Summary
Fields Modifier and Type Field Description Java.ElementValueelementValueThe element value associated with this single-element annotation.-
Fields inherited from class org.codehaus.janino.Java.AbstractAnnotation
type
-
-
Constructor Summary
Constructors Constructor Description SingleElementAnnotation(Java.ReferenceType type, Java.ElementValue elementValue)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <R,EX extends java.lang.Throwable>
Raccept(Visitor.AnnotationVisitor<R,EX> visitor)Java.TypegetType()voidsetEnclosingScope(Java.Scope enclosingScope)Sets the enclosing scope for this annotation.java.lang.StringtoString()-
Methods inherited from class org.codehaus.janino.Java.AbstractAnnotation
accept, accept, getLocation, throwCompileException
-
-
-
-
Field Detail
-
elementValue
public final Java.ElementValue elementValue
The element value associated with this single-element annotation.
-
-
Constructor Detail
-
SingleElementAnnotation
public SingleElementAnnotation(Java.ReferenceType type, Java.ElementValue elementValue)
-
-
Method Detail
-
setEnclosingScope
public void setEnclosingScope(Java.Scope enclosingScope)
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
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
getType
public Java.Type getType()
- Returns:
- The type of this annotation
-
accept
@Nullable public <R,EX extends java.lang.Throwable> R accept(Visitor.AnnotationVisitor<R,EX> visitor) throws EX extends java.lang.Throwable
Description copied from interface:Java.Annotation- Throws:
EX extends java.lang.Throwable
-
-