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
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
FieldsModifier and TypeFieldDescriptionThe optional "default value" of the declared method (only methods of annotation types can have a default value).(package private) IClass.IMethod
The resolvedIClass.IMethod
.final Java.TypeParameter[]
The type parameters declared for the method.Fields inherited from class org.codehaus.janino.Java.FunctionDeclarator
formalParameters, localVariables, name, returnType, 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
ConstructorsConstructorDescriptionMethodDeclarator
(Location location, String docComment, Java.Modifier[] modifiers, Java.TypeParameter[] typeParameters, Java.Type type, String name, Java.FunctionDeclarator.FormalParameters formalParameters, Java.Type[] thrownExceptions, Java.ElementValue defaultValue, List<? extends Java.BlockStatement> statements) -
Method Summary
Modifier and TypeMethodDescription<R,
EX extends Throwable>
Raccept
(Visitor.FunctionDeclaratorVisitor<R, EX> visitor) Invokes the "visit...()
" method ofVisitor.FunctionDeclaratorVisitor
for the concreteJava.FunctionDeclarator
type.(package private) Java.TypeParameter[]
boolean
boolean
boolean
isFinal()
boolean
isNative()
boolean
isStatic()
boolean
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)
.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 Details
-
typeParameters
The type parameters declared for the method. -
defaultValue
The optional "default value" of the declared method (only methods of annotation types can have a default value). -
iMethod
The resolvedIClass.IMethod
.
-
-
Constructor Details
-
MethodDeclarator
public MethodDeclarator(Location location, @Nullable String docComment, Java.Modifier[] modifiers, @Nullable Java.TypeParameter[] typeParameters, Java.Type type, String name, Java.FunctionDeclarator.FormalParameters formalParameters, Java.Type[] thrownExceptions, @Nullable Java.ElementValue defaultValue, @Nullable List<? extends Java.BlockStatement> statements) - Parameters:
defaultValue
- SeedefaultValue
-
-
Method Details
-
getOptionalTypeParameters
- Returns:
- The declared type parameters
-
setDeclaringType
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
Description copied from class:Java.AbstractTypeBodyDeclaration
Forward-implementsJava.BlockStatement.setEnclosingScope(Java.Scope)
.- Overrides:
setEnclosingScope
in classJava.FunctionDeclarator
-
toString
-
accept
@Nullable public <R,EX extends Throwable> R accept(Visitor.FunctionDeclaratorVisitor<R, EX> visitor) throws EXDescription copied from class:Java.FunctionDeclarator
Invokes the "visit...()
" method ofVisitor.FunctionDeclaratorVisitor
for the concreteJava.FunctionDeclarator
type.- Specified by:
accept
in classJava.FunctionDeclarator
- Throws:
EX
-
isStatic
public boolean isStatic() -
isDefault
public boolean isDefault() -
isAbstract
public boolean isAbstract() -
isNative
public boolean isNative() -
isFinal
public boolean isFinal() -
isSynchronized
public boolean isSynchronized()
-