Package org.codehaus.janino
Class Java.SingleElementAnnotation
- java.lang.Object
-
- org.codehaus.janino.Java.SingleElementAnnotation
-
- All Implemented Interfaces:
Java.Annotation
,Java.ElementValue
- Enclosing class:
- Java
public static final class Java.SingleElementAnnotation extends java.lang.Object implements Java.Annotation
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.Java.Type
type
The type of this single-element annotation.
-
Constructor Summary
Constructors Constructor Description SingleElementAnnotation(Java.Type type, Java.ElementValue elementValue)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
accept(Visitor.AnnotationVisitor visitor)
void
accept(Visitor.ElementValueVisitor visitor)
Invokes the 'visit...()
' method ofVisitor.ElementValueVisitor
for the concreteJava.ElementValue
type.Java.Type
getType()
void
setEnclosingScope(Java.Scope enclosingScope)
Sets the enclosing scope for this annotation.java.lang.String
toString()
-
-
-
Field Detail
-
type
public final Java.Type type
The type of this single-element annotation.
-
elementValue
public final Java.ElementValue elementValue
The element value associated with this single-element annotation.
-
-
Constructor Detail
-
SingleElementAnnotation
public SingleElementAnnotation(Java.Type 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
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
getType
public Java.Type getType()
- Specified by:
getType
in interfaceJava.Annotation
- Returns:
- The type of this annotation
-
accept
public void accept(Visitor.AnnotationVisitor visitor)
Description copied from interface:Java.Annotation
- Specified by:
accept
in interfaceJava.Annotation
-
accept
public void accept(Visitor.ElementValueVisitor visitor)
Description copied from interface:Java.ElementValue
Invokes the 'visit...()
' method ofVisitor.ElementValueVisitor
for the concreteJava.ElementValue
type.- Specified by:
accept
in interfaceJava.ElementValue
-
-