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.ElementValueVisitorfor the concreteJava.ElementValuetype.<R,EX extends java.lang.Throwable>
Raccept(Visitor.ModifierVisitor<R,EX> visitor)LocationgetLocation()voidsetEnclosingScope(Java.Scope enclosingScope)Sets the enclosing scope for this annotation.voidthrowCompileException(java.lang.String message)Throws aCompileExceptionwith 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.AnnotationSets the enclosing scope for this annotation.- Specified by:
setEnclosingScopein interfaceJava.Annotation- Specified by:
setEnclosingScopein interfaceJava.ElementValue
-
getLocation
public Location getLocation()
- Specified by:
getLocationin 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.ElementValueInvokes the "visit...()" method ofVisitor.ElementValueVisitorfor the concreteJava.ElementValuetype.- Specified by:
acceptin 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:
acceptin interfaceJava.Modifier- Throws:
EX extends java.lang.Throwable
-
throwCompileException
public void throwCompileException(java.lang.String message) throws CompileExceptionDescription copied from interface:Java.LocatableThrows aCompileExceptionwith the given message and this object's location.- Specified by:
throwCompileExceptionin interfaceJava.Locatable- Parameters:
message- The message to report- Throws:
CompileException
-
-