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).final Java.TypeParameter[]The type parameters declared for the method.Fields inherited from class org.codehaus.janino.Java.FunctionDeclarator
formalParameters, localVariables, name, statements, thrownExceptions, typeFields inherited from class org.codehaus.janino.Java.AbstractTypeBodyDeclaration
modifiersFields 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.FunctionDeclaratorVisitorfor the concreteJava.FunctionDeclaratortype.booleanbooleanbooleanisFinal()booleanisNative()booleanisStatic()booleanvoidsetDeclaringType(Java.TypeDeclaration declaringType) Sets the type declaration that this declaration belongs to.voidsetEnclosingScope(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, isStrictfpMethods inherited from class org.codehaus.janino.Java.AbstractTypeBodyDeclaration
getDeclaringType, getModifiersMethods inherited from class org.codehaus.janino.Java.Located
getLocation, throwCompileExceptionMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods 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).
-
-
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
-
setDeclaringType
Description copied from interface:Java.TypeBodyDeclarationSets the type declaration that this declaration belongs to.- Specified by:
setDeclaringTypein interfaceJava.TypeBodyDeclaration- Overrides:
setDeclaringTypein classJava.FunctionDeclarator
-
setEnclosingScope
Description copied from class:Java.AbstractTypeBodyDeclarationForward-implementsJava.BlockStatement.setEnclosingScope(Java.Scope).- Overrides:
setEnclosingScopein classJava.FunctionDeclarator
-
toString
-
accept
@Nullable public <R,EX extends Throwable> R accept(Visitor.FunctionDeclaratorVisitor<R, EX> visitor) throws EXDescription copied from class:Java.FunctionDeclaratorInvokes the "visit...()" method ofVisitor.FunctionDeclaratorVisitorfor the concreteJava.FunctionDeclaratortype.- Specified by:
acceptin 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()
-