Java org.eclipse.jdt.core.dom MethodDeclaration fields, constructors, methods, implement or subclass

Example usage for Java org.eclipse.jdt.core.dom MethodDeclaration fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for org.eclipse.jdt.core.dom MethodDeclaration.

The text is from its open source code.

Field

ChildPropertyDescriptorJAVADOC_PROPERTY
The "javadoc" structural property of this node type (child type: Javadoc ).
ChildListPropertyDescriptorMODIFIERS2_PROPERTY
The "modifiers" structural property of this node type (element type: IExtendedModifier ) (added in JLS3 API).
SimplePropertyDescriptorCONSTRUCTOR_PROPERTY
The "constructor" structural property of this node type (type: Boolean ).
ChildPropertyDescriptorNAME_PROPERTY
The "name" structural property of this node type (child type: SimpleName ).
ChildPropertyDescriptorRETURN_TYPE2_PROPERTY
The "returnType2" structural property of this node type (child type: Type ) (added in JLS3 API).
SimplePropertyDescriptorEXTRA_DIMENSIONS_PROPERTY
The "extraDimensions" structural property of this node type (type: Integer ) (below JLS8 only).
ChildListPropertyDescriptorTYPE_PARAMETERS_PROPERTY
The "typeParameters" structural property of this node type (element type: TypeParameter ) (added in JLS3 API).
ChildListPropertyDescriptorPARAMETERS_PROPERTY
The "parameters" structural property of this node type (element type: SingleVariableDeclaration ).
ChildListPropertyDescriptorTHROWN_EXCEPTIONS_PROPERTY
The "thrownExceptions" structural property of this node type (element type: Name ) (before JLS8 only).
ChildPropertyDescriptorBODY_PROPERTY
The "body" structural property of this node type (child type: Block ).
booleanisConstructor
true for a constructor, false for a method.
ASTNode.NodeListparameters
The parameter declarations (element type: SingleVariableDeclaration ).
ASTNode.NodeListtypeParameters
The type paramters (element type: TypeParameter ).
ASTNode.NodeListextraDimensions
List of extra dimensions this node has with optional annotations (element type: Dimension ).
ASTNode.NodeListthrownExceptions
The list of thrown exception names (element type: Name ).
ASTNode.NodeListthrownExceptionTypes
The list of thrown exception Types (element type: Type ).

Constructor

MethodDeclaration(AST ast)
Creates a new AST node for a method declaration owned by the given AST.

Method

voidaccept(ASTVisitor visitor)
Accepts the given visitor on a visit of the current node.
voiddelete()
Removes this node from its parent.
ASTgetAST()
Returns this node's AST.
BlockgetBody()
Returns the body of this method declaration, or null if this method has no body.
intgetExtraDimensions()
Returns the number of extra array dimensions over and above the explicitly-specified return type.
intgetFlags()
Returns the flags associated with this node.
JavadocgetJavadoc()
Returns the doc comment node.
intgetLength()
Returns the length in characters of the original source file indicating where the source fragment corresponding to this node ends.
StructuralPropertyDescriptorgetLocationInParent()
Returns the location of this node within its parent, or null if this is a root node.
intgetModifiers()
Returns the modifiers explicitly specified on this declaration.
ChildListPropertyDescriptorgetModifiersProperty()
Returns structural property descriptor for the "modifiers" property of this node as used in JLS3 (element type: IExtendedModifier ).
SimpleNamegetName()
Returns the name of the method declared in this method declaration.
intgetNodeType()
Returns an integer value identifying the type of this concrete AST node.
ASTNodegetParent()
Returns this node's parent node, or null if this is the root node.
ObjectgetProperty(String propertyName)
Returns the value of the named property of this node, or null if none.
SimpleNamegetReceiverQualifier()
Returns the qualifying name, if any, for the explicit receiver or null if not used (added in JLS8 API).
TypegetReceiverType()
Returns the receiver type explicitly declared in the method or constructor declaration (added in JLS8 API).
TypegetReturnType()
Returns the return type of the method declared in this method declaration, exclusive of any extra array dimensions (JLS2 API only).
TypegetReturnType2()
Returns the return type of the method declared in this method declaration, exclusive of any extra array dimensions (added in JLS3 API).
ASTNodegetRoot()
Returns the root node at or above this node; returns this node if it is a root.
intgetStartPosition()
Returns the character index into the original source file indicating where the source fragment corresponding to this node begins.
ObjectgetStructuralProperty(StructuralPropertyDescriptor property)
Returns the value of the given structural property for this node.
voidinternalSetModifiers(int pmodifiers)
Internal synonym for deprecated method.
voidinternalSetReturnType(Type type)
Internal synonym for deprecated method.
booleanisVarargs()
Returns whether this method declaration declares a variable arity method (added in JLS3 API).
Listmodifiers()
Returns the live ordered list of modifiers and annotations of this declaration (added in JLS3 API).
IMethodBindingresolveBinding()
Resolves and returns the binding for the method or constructor declared in this method or constructor declaration.
voidsetBody(Block body)
Sets or clears the body of this method declaration.
voidsetConstructor(boolean isConstructor)
Sets whether this declaration declares a constructor or a method.
voidsetExtraDimensions(int dimensions)
Sets the number of extra array dimensions over and above the explicitly-specified return type.
voidsetFlags(int flags)
Sets the flags associated with this node to the given value.
voidsetJavadoc(Javadoc docComment)
Sets or clears the doc comment node.
voidsetModifiers(int modifiers)
Sets the modifiers explicitly specified on this declaration (JLS2 API only).
voidsetName(SimpleName methodName)
Sets the name of the method declared in this method declaration to the given name.
voidsetProperty(String propertyName, Object data)
Sets the named property of this node to the given value, or to null to clear it.
voidsetReceiverType(Type receiverType)
Sets or clears the given type as the type of explicit receiver parameter (added in JLS8 API).
voidsetReturnType(Type type)
Sets the return type of the method declared in this method declaration to the given type, exclusive of any extra array dimensions (JLS2 API only).
voidsetReturnType2(Type type)
Sets the return type of the method declared in this method declaration to the given type, exclusive of any extra array dimensions (added in JLS3 API).
voidsetSourceRange(int startPosition, int length)
Sets the source range of the original source file where the source fragment corresponding to this node was found.
booleansubtreeMatch(ASTMatcher matcher, Object other)
Returns whether the subtree rooted at the given node matches the given other object as decided by the given matcher.
StringtoString()
Returns a string representation of this node suitable for debugging purposes only.