Package org.codehaus.janino

# Interface Java.Annotation

All Superinterfaces:
  `Java.ElementValue`, `Java.Locatable`, `Java.Modifier`

All Known Implementing Classes:
  `Java.AbstractAnnotation`, `Java.MarkerAnnotation`, `Java.NormalAnnotation`, `Java.SingleElementAnnotation`

Enclosing class:
  `Java`

public static interface Java.Annotation extends Java.Locatable, Java.ElementValue, Java.Modifier
Representation of a Java annotation.

## Method Summary

Modifier and Type
Method
Description
`<R, EX extends Throwable>
R`
`accept(Visitor.AnnotationVisitor<R,EX> visitor)`
Invokes the "`visit...()`" method of `Visitor.AnnotationVisitor` for the concrete `Java.Annotation` type.
`Java.Type`
`getType()`
`void`
`setEnclosingScope(Java.Scope enclosingScope)`
Sets the enclosing scope for this annotation.

### Methods inherited from interface org.codehaus.janino.Java.ElementValue

`accept`

### Methods inherited from interface org.codehaus.janino.Java.Locatable

`getLocation, throwCompileException`

### Methods inherited from interface org.codehaus.janino.Java.Modifier

`accept`

## Method Details

### accept

@Nullable <R, EX extends Throwable> R accept(Visitor.AnnotationVisitor<R,EX> visitor) throws EX
Invokes the "`visit...()`" method of `Visitor.AnnotationVisitor` for the concrete `Java.Annotation` type.

Throws:
  `EX`

### setEnclosingScope

void setEnclosingScope(Java.Scope enclosingScope)
Sets the enclosing scope for this annotation.

Specified by:
  `setEnclosingScope` in interface `Java.ElementValue`

### getType

Java.Type getType()

Returns:
  The type of this annotation