Groovy 1.7.10

## org.codehaus.groovy.ast
[Java] Class Parameter

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

All Implemented Interfaces:
  Variable

    public class Parameter
    extends AnnotatedNode

Represents a parameter on a constructor or method call. The type name is optional - it defaults to java.lang.Object if unknown.

Authors:
  James Strachan

Version:
  \$Revision: 20157 \$

Field Summary
`static Parameter[]` | `EMPTY_ARRAY`

Constructor Summary
`Parameter(ClassNode type, String name)`
`Parameter(ClassNode type, String name, Expression defaultValue)`

Method Summary
`Expression` | `getInitialExpression()` @return the default value expression for this parameter or null if no default value is specified
`String` | `getName()`
`ClassNode` | `getOriginType()`
`ClassNode` | `getType()`
`boolean` | `hasInitialExpression()`
`boolean` | `isClosureSharedVariable()`
`boolean` | `isDynamicTyped()`
`boolean` | `isInStaticContext()`
`void` | `setClosureSharedVariable(boolean inClosure)`
`void` | `setInStaticContext(boolean inStaticContext)`
`void` | `setInitialExpression(Expression init)`
`void` | `setType(ClassNode type)`
`String` | `toString()`

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

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

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

Field Detail

### EMPTY_ARRAY

    public static final Parameter[] EMPTY_ARRAY

Constructor Detail

### Parameter

    public Parameter(ClassNode type, String name)

### Parameter

    public Parameter(ClassNode type, String name, Expression defaultValue)

Method Detail

### getInitialExpression

    public Expression getInitialExpression()

  Returns:
    the default value expression for this parameter or null if no default value is specified

### getName

    public String getName()

### getOriginType

    public ClassNode getOriginType()

### getType

    public ClassNode getType()

### hasInitialExpression

    public boolean hasInitialExpression()

### isClosureSharedVariable

    public boolean isClosureSharedVariable()

### isDynamicTyped

    public boolean isDynamicTyped()

### isInStaticContext

    public boolean isInStaticContext()

### setClosureSharedVariable

    public void setClosureSharedVariable(boolean inClosure)

### setInStaticContext

    public void setInStaticContext(boolean inStaticContext)

### setInitialExpression

    public void setInitialExpression(Expression init)

### setType

    public void setType(ClassNode type)

### toString

    public String toString()

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