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 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.ElementValueelementValueThe element value associated with this single-element annotation.Java.TypetypeThe 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 voidaccept(Visitor.AnnotationVisitor visitor)voidaccept(Visitor.ElementValueVisitor visitor)Invokes the 'visit...()' method ofVisitor.ElementValueVisitorfor the concreteJava.ElementValuetype.Java.TypegetType()voidsetEnclosingScope(Java.Scope enclosingScope)Sets the enclosing scope for this annotation.StringtoString()
-
-
-
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.AnnotationSets the enclosing scope for this annotation.- Specified by:
setEnclosingScopein interfaceJava.Annotation
-
getType
public Java.Type getType()
- Specified by:
getTypein interfaceJava.Annotation- Returns:
- The type of this annotation
-
accept
public void accept(Visitor.AnnotationVisitor visitor)
Description copied from interface:Java.Annotation- Specified by:
acceptin interfaceJava.Annotation
-
accept
public void accept(Visitor.ElementValueVisitor visitor)
Description copied from interface:Java.ElementValueInvokes the 'visit...()' method ofVisitor.ElementValueVisitorfor the concreteJava.ElementValuetype.- Specified by:
acceptin interfaceJava.ElementValue
-
-