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
Convenience class.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal <R,
EX extends Throwable>
Raccept
(Visitor.ElementValueVisitor<R, EX> visitor) Invokes the "visit...()
" method ofVisitor.ElementValueVisitor
for the concreteJava.ElementValue
type.final <R,
EX extends Throwable>
Raccept
(Visitor.ModifierVisitor<R, EX> visitor) void
setEnclosingScope
(Java.Scope enclosingScope) Sets the enclosing scope for this annotation.void
throwCompileException
(String message) Throws aCompileException
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
The type of this annotation.
-
-
Constructor Details
-
AbstractAnnotation
-
-
Method Details
-
setEnclosingScope
Description copied from interface:Java.Annotation
Sets the enclosing scope for this annotation.- Specified by:
setEnclosingScope
in interfaceJava.Annotation
- Specified by:
setEnclosingScope
in interfaceJava.ElementValue
-
getLocation
- Specified by:
getLocation
in interfaceJava.Locatable
- Returns:
- The location of this object
-
accept
@Nullable public final <R,EX extends Throwable> R accept(Visitor.ElementValueVisitor<R, EX> visitor) throws EXDescription copied from interface:Java.ElementValue
Invokes the "visit...()
" method ofVisitor.ElementValueVisitor
for the concreteJava.ElementValue
type.- Specified by:
accept
in interfaceJava.ElementValue
- Throws:
EX
-
accept
@Nullable public final <R,EX extends Throwable> R accept(Visitor.ModifierVisitor<R, EX> visitor) throws EXDescription copied from interface:Java.Modifier
- Specified by:
accept
in interfaceJava.Modifier
- Throws:
EX
-
throwCompileException
Description copied from interface:Java.Locatable
Throws aCompileException
with the given message and this object's location.- Specified by:
throwCompileException
in interfaceJava.Locatable
- Parameters:
message
- The message to report- Throws:
CompileException
-