Example usage for Java org.eclipse.jdt.core.dom MethodDeclaration fields, constructors, methods, implement or subclass
The text is from its open source code.
ChildPropertyDescriptor | JAVADOC_PROPERTY The "javadoc" structural property of this node type (child type: Javadoc ). |
ChildListPropertyDescriptor | MODIFIERS2_PROPERTY The "modifiers" structural property of this node type (element type: IExtendedModifier ) (added in JLS3 API). |
SimplePropertyDescriptor | CONSTRUCTOR_PROPERTY The "constructor" structural property of this node type (type: Boolean ). |
ChildPropertyDescriptor | NAME_PROPERTY The "name" structural property of this node type (child type: SimpleName ). |
ChildPropertyDescriptor | RETURN_TYPE2_PROPERTY The "returnType2" structural property of this node type (child type: Type ) (added in JLS3 API). |
SimplePropertyDescriptor | EXTRA_DIMENSIONS_PROPERTY The "extraDimensions" structural property of this node type (type: Integer ) (below JLS8 only). |
ChildListPropertyDescriptor | TYPE_PARAMETERS_PROPERTY The "typeParameters" structural property of this node type (element type: TypeParameter ) (added in JLS3 API). |
ChildListPropertyDescriptor | PARAMETERS_PROPERTY The "parameters" structural property of this node type (element type: SingleVariableDeclaration ). |
ChildListPropertyDescriptor | THROWN_EXCEPTIONS_PROPERTY The "thrownExceptions" structural property of this node type (element type: Name ) (before JLS8 only). |
ChildPropertyDescriptor | BODY_PROPERTY The "body" structural property of this node type (child type: Block ). |
boolean | isConstructortrue for a constructor, false for a method. |
ASTNode.NodeList | parameters The parameter declarations (element type: SingleVariableDeclaration ). |
ASTNode.NodeList | typeParameters The type paramters (element type: TypeParameter ). |
ASTNode.NodeList | extraDimensions List of extra dimensions this node has with optional annotations (element type: Dimension ). |
ASTNode.NodeList | thrownExceptions The list of thrown exception names (element type: Name ). |
ASTNode.NodeList | thrownExceptionTypes The list of thrown exception Types (element type: Type ). |
MethodDeclaration(AST ast) Creates a new AST node for a method declaration owned by the given AST. |
void | accept(ASTVisitor visitor) Accepts the given visitor on a visit of the current node. |
void | delete() Removes this node from its parent. |
AST | getAST() Returns this node's AST. |
Block | getBody() Returns the body of this method declaration, or null if this method has no body. |
int | getExtraDimensions() Returns the number of extra array dimensions over and above the explicitly-specified return type. |
int | getFlags() Returns the flags associated with this node. |
Javadoc | getJavadoc() Returns the doc comment node. |
int | getLength() Returns the length in characters of the original source file indicating where the source fragment corresponding to this node ends. |
StructuralPropertyDescriptor | getLocationInParent() Returns the location of this node within its parent, or null if this is a root node. |
int | getModifiers() Returns the modifiers explicitly specified on this declaration. |
ChildListPropertyDescriptor | getModifiersProperty() Returns structural property descriptor for the "modifiers" property of this node as used in JLS3 (element type: IExtendedModifier ). |
SimpleName | getName() Returns the name of the method declared in this method declaration. |
int | getNodeType() Returns an integer value identifying the type of this concrete AST node. |
ASTNode | getParent() Returns this node's parent node, or null if this is the root node. |
Object | getProperty(String propertyName) Returns the value of the named property of this node, or null if none. |
SimpleName | getReceiverQualifier() Returns the qualifying name, if any, for the explicit receiver or null if not used (added in JLS8 API). |
Type | getReceiverType() Returns the receiver type explicitly declared in the method or constructor declaration (added in JLS8 API). |
Type | getReturnType() Returns the return type of the method declared in this method declaration, exclusive of any extra array dimensions (JLS2 API only). |
Type | getReturnType2() Returns the return type of the method declared in this method declaration, exclusive of any extra array dimensions (added in JLS3 API). |
ASTNode | getRoot() Returns the root node at or above this node; returns this node if it is a root. |
int | getStartPosition() Returns the character index into the original source file indicating where the source fragment corresponding to this node begins. |
Object | getStructuralProperty(StructuralPropertyDescriptor property) Returns the value of the given structural property for this node. |
void | internalSetModifiers(int pmodifiers) Internal synonym for deprecated method. |
void | internalSetReturnType(Type type) Internal synonym for deprecated method. |
boolean | isVarargs() Returns whether this method declaration declares a variable arity method (added in JLS3 API). |
List | modifiers() Returns the live ordered list of modifiers and annotations of this declaration (added in JLS3 API). |
IMethodBinding | resolveBinding() Resolves and returns the binding for the method or constructor declared in this method or constructor declaration. |
void | setBody(Block body) Sets or clears the body of this method declaration. |
void | setConstructor(boolean isConstructor) Sets whether this declaration declares a constructor or a method. |
void | setExtraDimensions(int dimensions) Sets the number of extra array dimensions over and above the explicitly-specified return type. |
void | setFlags(int flags) Sets the flags associated with this node to the given value. |
void | setJavadoc(Javadoc docComment) Sets or clears the doc comment node. |
void | setModifiers(int modifiers) Sets the modifiers explicitly specified on this declaration (JLS2 API only). |
void | setName(SimpleName methodName) Sets the name of the method declared in this method declaration to the given name. |
void | setProperty(String propertyName, Object data) Sets the named property of this node to the given value, or to null to clear it. |
void | setReceiverType(Type receiverType) Sets or clears the given type as the type of explicit receiver parameter (added in JLS8 API). |
void | setReturnType(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). |
void | setReturnType2(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). |
void | setSourceRange(int startPosition, int length) Sets the source range of the original source file where the source fragment corresponding to this node was found. |
boolean | subtreeMatch(ASTMatcher matcher, Object other) Returns whether the subtree rooted at the given node matches the given other object as decided by the given matcher. |
String | toString() Returns a string representation of this node suitable for debugging purposes only. |