janino.net

org.codehaus.janino
Class Java.SingleElementAnnotation

java.lang.Object
  extended by 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
 Java.ElementValue elementValue
          The element value associated with this single-element annotation.
 Java.Type type
          The type of this single-element annotation.
 
Constructor Summary
Java.SingleElementAnnotation(Java.Type type, Java.ElementValue elementValue)
           
 
Method Summary
 void accept(Visitor.AnnotationVisitor visitor)
          Invokes the 'visit...()' method of Visitor.AnnotationVisitor for the concrete Java.Annotation type.
 void accept(Visitor.ElementValueVisitor visitor)
          Invokes the 'visit...()' method of Visitor.ElementValueVisitor for the concrete Java.ElementValue type.
 Java.Type getType()
           
 void setEnclosingScope(Java.Scope enclosingScope)
          Sets the enclosing scope for this annotation.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

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

Java.SingleElementAnnotation

public Java.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 interface Java.Annotation

toString

public String toString()
Overrides:
toString in class Object

getType

public Java.Type getType()
Specified by:
getType in interface Java.Annotation
Returns:
The type of this annotation

accept

public void accept(Visitor.AnnotationVisitor visitor)
Description copied from interface: Java.Annotation
Invokes the 'visit...()' method of Visitor.AnnotationVisitor for the concrete Java.Annotation type.

Specified by:
accept in interface Java.Annotation

accept

public void accept(Visitor.ElementValueVisitor visitor)
Description copied from interface: Java.ElementValue
Invokes the 'visit...()' method of Visitor.ElementValueVisitor for the concrete Java.ElementValue type.

Specified by:
accept in interface Java.ElementValue

janino.net