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.ElementValue
elementValue
The 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.Type
getType()
void
setEnclosingScope(Java.Scope enclosingScope)
Sets the enclosing scope for this annotation.java.lang.String
toString()
-
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.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
public java.lang.String toString()
- Overrides:
toString
in 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
-
-