Package org.codehaus.janino

# Class Java.AbstractAnnotation

java.lang.Object
org.codehaus.janino.Java.AbstractAnnotation

All Implemented Interfaces:
  `Java.Annotation`, `Java.ElementValue`, `Java.Locatable`, `Java.Modifier`

Direct Known Subclasses:
  `Java.MarkerAnnotation`, `Java.NormalAnnotation`, `Java.SingleElementAnnotation`

Enclosing class:
  `Java`

public abstract static class Java.AbstractAnnotation extends Object implements Java.Annotation
Convenience class.

## Field Summary

Fields
Modifier and Type
Field
Description
`final Java.Type`
`type`
The type of this annotation.

## Constructor Summary

Constructors
Constructor
Description
`AbstractAnnotation(Java.Type type)`

## Method Summary

Modifier and Type
Method
Description
`final <R, EX extends Throwable>
R`
`accept(Visitor.ElementValueVisitor<R,EX> visitor)`
Invokes the "`visit...()`" method of `Visitor.ElementValueVisitor` for the concrete `Java.ElementValue` type.
`final <R, EX extends Throwable>
R`
`accept(Visitor.ModifierVisitor<R,EX> visitor)`
Invokes the "`visit...()`" method of `Visitor.ModifierVisitor` for the concrete `Java.Modifier` type.
`Location`
`getLocation()`
`void`
`setEnclosingScope(Java.Scope enclosingScope)`
Sets the enclosing scope for this annotation.
`void`
`throwCompileException(String message)`
Throws a `CompileException` with the given message and this object's location.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

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

`accept, getType`

## Field Details

### type

public final Java.Type type
The type of this annotation.

## Constructor Details

### AbstractAnnotation

public AbstractAnnotation(Java.Type type)

## Method Details

### 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`
Specified by:
  `setEnclosingScope` in interface `Java.ElementValue`

### getLocation

public Location getLocation()

Specified by:
  `getLocation` in interface `Java.Locatable`
Returns:
  The location of this object

### accept

@Nullable public final <R, EX extends Throwable> R accept(Visitor.ElementValueVisitor<R,EX> visitor) throws EX
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`
Throws:
  `EX`

### accept

@Nullable public final <R, EX extends Throwable> R accept(Visitor.ModifierVisitor<R,EX> visitor) throws EX
Description copied from interface: `Java.Modifier`
Invokes the "`visit...()`" method of `Visitor.ModifierVisitor` for the concrete `Java.Modifier` type.

Specified by:
  `accept` in interface `Java.Modifier`
Throws:
  `EX`

### throwCompileException

public void throwCompileException(String message) throws CompileException
Description copied from interface: `Java.Locatable`
Throws a `CompileException` with the given message and this object's location.

Specified by:
  `throwCompileException` in interface `Java.Locatable`
Parameters:
  `message` - The message to report
Throws:
  `CompileException`