public abstract static class Java.FunctionDeclarator extends Java.AbstractTypeBodyDeclaration implements Java.Annotatable, Java.DocCommentable
Java.ConstructorDeclarator and Java.MethodDeclarator.| Modifier and Type | Class and Description |
|---|---|
static class |
Java.FunctionDeclarator.FormalParameter
Representation of a (formal) function parameter.
|
static class |
Java.FunctionDeclarator.FormalParameters
Representation of the (formal) function parameters.
|
| Modifier and Type | Field and Description |
|---|---|
Java.FunctionDeclarator.FormalParameters |
formalParameters
The parameters of the function.
|
Map<String,Java.LocalVariable> |
localVariables
Mapping of variable names to
Java.LocalVariables. |
Java.Modifiers |
modifiers
The
Java.Modifiers of this declarator. |
String |
name
The name of the function (
"<init>" for constructors). |
List<? extends Java.BlockStatement> |
optionalStatements
The statements that comprise the function;
null for abstract method declarations. |
Java.Type[] |
thrownExceptions
The types of the declared exceptions.
|
Java.Type |
type
The return type of the function (VOID for constructors).
|
statiCNOWHERE| Constructor and Description |
|---|
FunctionDeclarator(Location location,
String optionalDocComment,
Java.Modifiers modifiers,
Java.Type type,
String name,
Java.FunctionDeclarator.FormalParameters parameters,
Java.Type[] thrownExceptions,
List<? extends Java.BlockStatement> optionalStatements) |
| Modifier and Type | Method and Description |
|---|---|
abstract <R,EX extends Throwable> |
accept(Visitor.FunctionDeclaratorVisitor<R,EX> visitor)
Invokes the '
visit...()' method of Visitor.FunctionDeclaratorVisitor for the concrete
Java.FunctionDeclarator type. |
Java.Annotation[] |
getAnnotations() |
String |
getDocComment() |
Java.Scope |
getEnclosingScope() |
boolean |
hasDeprecatedDocTag()
Returns
true if the object has a doc comment and
the @deprecated tag appears in the doc
comment. |
void |
setDeclaringType(Java.TypeDeclaration declaringType)
Sets the type declaration that this declaration belongs to.
|
void |
setEnclosingScope(Java.Scope enclosingScope)
Forward-implements
Java.BlockStatement.setEnclosingScope(Java.Scope). |
getDeclaringType, isStaticgetLocation, throwCompileExceptionclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitacceptgetLocation, throwCompileExceptionpublic final Java.Modifiers modifiers
Java.Modifiers of this declarator.public final Java.Type type
public final String name
"<init>" for constructors).public final Java.FunctionDeclarator.FormalParameters formalParameters
public final Java.Type[] thrownExceptions
@Nullable public final List<? extends Java.BlockStatement> optionalStatements
null for abstract method declarations.@Nullable public Map<String,Java.LocalVariable> localVariables
Java.LocalVariables.public FunctionDeclarator(Location location, @Nullable String optionalDocComment, Java.Modifiers modifiers, Java.Type type, String name, Java.FunctionDeclarator.FormalParameters parameters, Java.Type[] thrownExceptions, @Nullable List<? extends Java.BlockStatement> optionalStatements)
public Java.Annotation[] getAnnotations()
getAnnotations in interface Java.Annotatable@Nullable public abstract <R,EX extends Throwable> R accept(Visitor.FunctionDeclaratorVisitor<R,EX> visitor) throws EX extends Throwable
visit...()' method of Visitor.FunctionDeclaratorVisitor for the concrete
Java.FunctionDeclarator type.EX extends Throwablepublic void setDeclaringType(Java.TypeDeclaration declaringType)
Java.TypeBodyDeclarationsetDeclaringType in interface Java.TypeBodyDeclarationsetDeclaringType in class Java.AbstractTypeBodyDeclarationpublic void setEnclosingScope(Java.Scope enclosingScope)
Java.AbstractTypeBodyDeclarationJava.BlockStatement.setEnclosingScope(Java.Scope).setEnclosingScope in class Java.AbstractTypeBodyDeclarationpublic Java.Scope getEnclosingScope()
getEnclosingScope in interface Java.ScopegetEnclosingScope in class Java.AbstractTypeBodyDeclarationnull@Nullable public String getDocComment()
getDocComment in interface Java.DocCommentablenullpublic boolean hasDeprecatedDocTag()
Java.DocCommentabletrue if the object has a doc comment and
the @deprecated tag appears in the doc
comment.hasDeprecatedDocTag in interface Java.DocCommentable