Groovy 1.7.0

## org.codehaus.groovy.ast
Class MethodNode

    java.lang.Object
      org.codehaus.groovy.ast.ASTNode
          org.codehaus.groovy.ast.AnnotatedNode
              org.codehaus.groovy.ast.MethodNode

All Implemented Interfaces:
  org.objectweb.asm.Opcodes

    class MethodNode
    extends AnnotatedNode

Represents a method declaration

author:
  James Strachan

version:
  $Revision: 18462 $

Field Summary
`String` | `typeDescriptor`

Constructor Summary
`MethodNode(String name, int modifiers, ClassNode returnType, Parameter[] parameters, ClassNode[] exceptions, Statement code)`

Method Summary
`Statement` | `getCode()`
`ClassNode[]` | `getExceptions()`
`Statement` | `getFirstStatement()`
`GenericsType[]` | `getGenericsTypes()`
`int` | `getModifiers()`
`String` | `getName()`
`Parameter[]` | `getParameters()`
`ClassNode` | `getReturnType()`
`String` | `getTypeDescriptor()` The type descriptor for a method node is a string containing the name of the method, its return type, and its parameter types in a canonical form.
`VariableScope` | `getVariableScope()`
`boolean` | `hasAnnotationDefault()`
`boolean` | `hasDefaultValue()`
`boolean` | `isAbstract()`
`boolean` | `isDynamicReturnType()`
`boolean` | `isPrivate()`
`boolean` | `isProtected()`
`boolean` | `isPublic()`
`boolean` | `isStatic()`
`boolean` | `isStaticConstructor()`
`boolean` | `isVoidMethod()`
`void` | `setAnnotationDefault(boolean b)`
`void` | `setCode(Statement code)`
`void` | `setGenericsTypes(GenericsType[] genericsTypes)`
`void` | `setModifiers(int modifiers)`
`void` | `setParameters(Parameter[] parameters)`
`void` | `setReturnType(ClassNode returnType)`
`void` | `setVariableScope(VariableScope variableScope)`
`String` | `toString()`

Methods inherited from class AnnotatedNode
addAnnotation, addAnnotations, getAnnotations, getAnnotations, getDeclaringClass, isSynthetic, setDeclaringClass, setSynthetic

Methods inherited from class ASTNode
getColumnNumber, getLastColumnNumber, getLastLineNumber, getLineNumber, getText, setColumnNumber, setLastColumnNumber, setLastLineNumber, setLineNumber, setSourcePosition, visit

Methods inherited from class Object
wait, wait, wait, hashCode, getClass, equals, toString, notify, notifyAll

Field Detail

### typeDescriptor

    String typeDescriptor

Constructor Detail

### MethodNode

    public MethodNode(String name, int modifiers, ClassNode returnType, Parameter[] parameters, ClassNode[] exceptions, Statement code)

Method Detail

### getCode

    public Statement getCode()

### getExceptions

    public ClassNode[] getExceptions()

### getFirstStatement

    public Statement getFirstStatement()

### getGenericsTypes

    public GenericsType[] getGenericsTypes()

### getModifiers

    public int getModifiers()

### getName

    public String getName()

### getParameters

    public Parameter[] getParameters()

### getReturnType

    public ClassNode getReturnType()

### getTypeDescriptor

    public String getTypeDescriptor()

  The type descriptor for a method node is a string containing the name of the method, its return type, and its parameter types in a canonical form. For simplicity, I'm using the format of a Java declaration without parameter names.

### getVariableScope

    public VariableScope getVariableScope()

### hasAnnotationDefault

    public boolean hasAnnotationDefault()

### hasDefaultValue

    public boolean hasDefaultValue()

### isAbstract

    public boolean isAbstract()

### isDynamicReturnType

    public boolean isDynamicReturnType()

### isPrivate

    public boolean isPrivate()

### isProtected

    public boolean isProtected()

### isPublic

    public boolean isPublic()

### isStatic

    public boolean isStatic()

### isStaticConstructor

    public boolean isStaticConstructor()

### isVoidMethod

    public boolean isVoidMethod()

### setAnnotationDefault

    public void setAnnotationDefault(boolean b)

### setCode

    public void setCode(Statement code)

### setGenericsTypes

    public void setGenericsTypes(GenericsType[] genericsTypes)

### setModifiers

    public void setModifiers(int modifiers)

### setParameters

    public void setParameters(Parameter[] parameters)

### setReturnType

    public void setReturnType(ClassNode returnType)

### setVariableScope

    public void setVariableScope(VariableScope variableScope)

### toString

    public String toString()

Copyright © 2003-2009 The Codehaus. All rights reserved.