Package org.codehaus.janino
Interface Java.TypeBodyDeclaration
- All Superinterfaces:
Java.Locatable,Java.Scope
- All Known Subinterfaces:
Java.FieldDeclarationOrInitializer,Java.MemberTypeDeclaration
- All Known Implementing Classes:
Java.AbstractTypeBodyDeclaration,Java.ConstructorDeclarator,Java.FieldDeclaration,Java.FunctionDeclarator,Java.Initializer,Java.MemberAnnotationTypeDeclaration,Java.MemberClassDeclaration,Java.MemberEnumDeclaration,Java.MemberInterfaceDeclaration,Java.MethodDeclarator
- Enclosing class:
Java
Representation of a "ClassBodyDeclaration" or an "InterfaceMemberDeclaration". These are:
- Field declarators
- Method declarators
- Static and non-static initializers
- Member type declarations
-
Method Summary
Modifier and TypeMethodDescription<R,EX extends Throwable>
Raccept(Visitor.TypeBodyDeclarationVisitor<R, EX> visitor) Invokes the "visit...()" method ofVisitor.TypeBodyDeclarationVisitorfor the concreteJava.TypeBodyDeclarationtype.voidsetDeclaringType(Java.TypeDeclaration declaringType) Sets the type declaration that this declaration belongs to.Methods inherited from interface org.codehaus.janino.Java.Locatable
getLocation, throwCompileExceptionMethods inherited from interface org.codehaus.janino.Java.Scope
getEnclosingScope
-
Method Details
-
setDeclaringType
Sets the type declaration that this declaration belongs to. -
getDeclaringType
Java.TypeDeclaration getDeclaringType()- Returns:
- The type declaration that this declaration belongs to.
-
getModifiers
Java.Modifier[] getModifiers()- Returns:
- The
Java.Modifiers of this declaration
-
accept
@Nullable <R,EX extends Throwable> R accept(Visitor.TypeBodyDeclarationVisitor<R, EX> visitor) throws EXInvokes the "visit...()" method ofVisitor.TypeBodyDeclarationVisitorfor the concreteJava.TypeBodyDeclarationtype.- Throws:
EX
-