Package org.codehaus.janino
Class Java.MethodDeclarator
- java.lang.Object
-
- org.codehaus.janino.Java.Located
-
- org.codehaus.janino.Java.AbstractTypeBodyDeclaration
-
- org.codehaus.janino.Java.FunctionDeclarator
-
- org.codehaus.janino.Java.MethodDeclarator
-
- All Implemented Interfaces:
Java.Annotatable
,Java.DocCommentable
,Java.Locatable
,Java.Scope
,Java.TypeBodyDeclaration
- Enclosing class:
- Java
public static final class Java.MethodDeclarator extends Java.FunctionDeclarator
Representation of a method declarator.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.codehaus.janino.Java.FunctionDeclarator
Java.FunctionDeclarator.FormalParameter, Java.FunctionDeclarator.FormalParameters
-
-
Field Summary
Fields Modifier and Type Field Description Java.ElementValue
defaultValue
The optional "default value" of the declared method (only methods of annotation types can have a default value).Java.TypeParameter[]
typeParameters
The type parameters declared for the method.-
Fields inherited from class org.codehaus.janino.Java.FunctionDeclarator
formalParameters, localVariables, name, statements, thrownExceptions, type
-
Fields inherited from class org.codehaus.janino.Java.AbstractTypeBodyDeclaration
modifiers
-
Fields inherited from class org.codehaus.janino.Java.Located
NOWHERE
-
-
Constructor Summary
Constructors Constructor Description MethodDeclarator(Location location, java.lang.String docComment, Java.Modifier[] modifiers, Java.TypeParameter[] typeParameters, Java.Type type, java.lang.String name, Java.FunctionDeclarator.FormalParameters formalParameters, Java.Type[] thrownExceptions, Java.ElementValue defaultValue, java.util.List<? extends Java.BlockStatement> statements)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <R,EX extends java.lang.Throwable>
Raccept(Visitor.FunctionDeclaratorVisitor<R,EX> visitor)
Invokes the "visit...()
" method ofVisitor.FunctionDeclaratorVisitor
for the concreteJava.FunctionDeclarator
type.boolean
isAbstract()
boolean
isDefault()
boolean
isFinal()
boolean
isNative()
boolean
isStatic()
boolean
isSynchronized()
void
setDeclaringType(Java.TypeDeclaration declaringType)
Sets the type declaration that this declaration belongs to.void
setEnclosingScope(Java.Scope enclosingScope)
Forward-implementsJava.BlockStatement.setEnclosingScope(Java.Scope)
.java.lang.String
toString()
-
Methods inherited from class org.codehaus.janino.Java.FunctionDeclarator
accept, getAccess, getAnnotations, getDocComment, getEnclosingScope, hasDeprecatedDocTag, isStrictfp
-
Methods inherited from class org.codehaus.janino.Java.AbstractTypeBodyDeclaration
getDeclaringType, getModifiers
-
Methods inherited from class org.codehaus.janino.Java.Located
getLocation, throwCompileException
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.codehaus.janino.Java.Locatable
getLocation, throwCompileException
-
-
-
-
Field Detail
-
typeParameters
@Nullable public final Java.TypeParameter[] typeParameters
The type parameters declared for the method.
-
defaultValue
@Nullable public Java.ElementValue defaultValue
The optional "default value" of the declared method (only methods of annotation types can have a default value).
-
-
Constructor Detail
-
MethodDeclarator
public MethodDeclarator(Location location, @Nullable java.lang.String docComment, Java.Modifier[] modifiers, @Nullable Java.TypeParameter[] typeParameters, Java.Type type, java.lang.String name, Java.FunctionDeclarator.FormalParameters formalParameters, Java.Type[] thrownExceptions, @Nullable Java.ElementValue defaultValue, @Nullable java.util.List<? extends Java.BlockStatement> statements)
- Parameters:
defaultValue
- SeedefaultValue
-
-
Method Detail
-
setDeclaringType
public void setDeclaringType(Java.TypeDeclaration declaringType)
Description copied from interface:Java.TypeBodyDeclaration
Sets the type declaration that this declaration belongs to.- Specified by:
setDeclaringType
in interfaceJava.TypeBodyDeclaration
- Overrides:
setDeclaringType
in classJava.FunctionDeclarator
-
setEnclosingScope
public void setEnclosingScope(Java.Scope enclosingScope)
Description copied from class:Java.AbstractTypeBodyDeclaration
Forward-implementsJava.BlockStatement.setEnclosingScope(Java.Scope)
.- Overrides:
setEnclosingScope
in classJava.FunctionDeclarator
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
accept
@Nullable public <R,EX extends java.lang.Throwable> R accept(Visitor.FunctionDeclaratorVisitor<R,EX> visitor) throws EX extends java.lang.Throwable
Description copied from class:Java.FunctionDeclarator
Invokes the "visit...()
" method ofVisitor.FunctionDeclaratorVisitor
for the concreteJava.FunctionDeclarator
type.- Specified by:
accept
in classJava.FunctionDeclarator
- Throws:
EX extends java.lang.Throwable
-
isStatic
public boolean isStatic()
-
isDefault
public boolean isDefault()
-
isAbstract
public boolean isAbstract()
-
isNative
public boolean isNative()
-
isFinal
public boolean isFinal()
-
isSynchronized
public boolean isSynchronized()
-
-