Overview | Package | Class
| FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.codehaus.groovy.ast
Class Parameter

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

author:
  James Strachan

version:
  $Revision: 11961 $

Field Summary
`def` | `EMPTY_ARRAY`
`boolean` | `closureShare`
`Expression` | `defaultValue`
`boolean` | `dynamicTyped`
`boolean` | `hasDefaultValue`
`boolean` | `inStaticContext`
`String` | `name`
`ClassNode` | `type`

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

Method Summary
`Expression` | `getInitialExpression()` 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()`

Constructor Detail

### Parameter

    public Parameter(ClassNode type, String name)

### Parameter

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

Method Detail

### getInitialExpression

    public Expression getInitialExpression()

  return:
    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()