org.codehaus.groovy.ast
Class Parameter

java.lang.Object
  extended byorg.codehaus.groovy.ast.Parameter

public class Parameter
extends Object

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

Version:
$Revision: 1.9 $
Author:
James Strachan

Field Summary
static Parameter[] EMPTY_ARRAY
           
 
Constructor Summary
Parameter(String name)
           
Parameter(String type, String name)
           
Parameter(String type, String name, Expression defaultValue)
           
 
Method Summary
 Expression getDefaultValue()
           
 String getName()
           
 String getRealType()
           
 String getType()
           
 boolean isDynamicType()
           
 void makeReference()
           
 void setType(String type)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

EMPTY_ARRAY

public static final Parameter[] EMPTY_ARRAY
Constructor Detail

Parameter

public Parameter(String name)

Parameter

public Parameter(String type,
                 String name)

Parameter

public Parameter(String type,
                 String name,
                 Expression defaultValue)
Method Detail

toString

public String toString()

getName

public String getName()

getType

public String getType()

setType

public void setType(String type)

isDynamicType

public boolean isDynamicType()

getDefaultValue

public Expression getDefaultValue()
Returns:
the default value expression for this parameter or null if no default value is specified

makeReference

public void makeReference()

getRealType

public String getRealType()
Returns:
the real logical type if a dereference is being made (e.g. to share variables across closure scopes)


Copyright © 2003-2004 The Codehaus. All Rights Reserved.