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 java.lang.Object implements Java.Annotation
Convenience class.
-
-
Constructor Summary
Constructors Constructor Description AbstractAnnotation(Java.Type type)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <R,EX extends java.lang.Throwable>
Raccept(Visitor.ElementValueVisitor<R,EX> visitor)
Invokes the "visit...()
" method ofVisitor.ElementValueVisitor
for the concreteJava.ElementValue
type.<R,EX extends java.lang.Throwable>
Raccept(Visitor.ModifierVisitor<R,EX> visitor)
Location
getLocation()
void
setEnclosingScope(Java.Scope enclosingScope)
Sets the enclosing scope for this annotation.void
throwCompileException(java.lang.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 Detail
-
type
public final Java.Type type
The type of this annotation.
-
-
Constructor Detail
-
AbstractAnnotation
public AbstractAnnotation(Java.Type type)
-
-
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 interfaceJava.Annotation
- Specified by:
setEnclosingScope
in interfaceJava.ElementValue
-
getLocation
public Location getLocation()
- Specified by:
getLocation
in interfaceJava.Locatable
- Returns:
- The location of this object
-
accept
@Nullable public final <R,EX extends java.lang.Throwable> R accept(Visitor.ElementValueVisitor<R,EX> visitor) throws EX extends java.lang.Throwable
Description copied from interface:Java.ElementValue
Invokes the "visit...()
" method ofVisitor.ElementValueVisitor
for the concreteJava.ElementValue
type.- Specified by:
accept
in interfaceJava.ElementValue
- Throws:
EX extends java.lang.Throwable
-
accept
@Nullable public final <R,EX extends java.lang.Throwable> R accept(Visitor.ModifierVisitor<R,EX> visitor) throws EX extends java.lang.Throwable
Description copied from interface:Java.Modifier
- Specified by:
accept
in interfaceJava.Modifier
- Throws:
EX extends java.lang.Throwable
-
throwCompileException
public void throwCompileException(java.lang.String message) throws CompileException
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
-
-