|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.codehaus.groovy.ast.ASTNode
org.codehaus.groovy.ast.AnnotatedNode
org.codehaus.groovy.ast.Parameter
public class Parameter
Represents a parameter on a constructor or method call. The type name is optional - it defaults to java.lang.Object if unknown.
| Field Summary | |
|---|---|
static Parameter[] |
EMPTY_ARRAY
|
| Constructor Summary | |
|---|---|
Parameter(ClassNode type,
String name)
|
|
Parameter(ClassNode type,
String name,
Expression defaultValue)
|
|
| Method Summary | |
|---|---|
Expression |
getInitialExpression()
expression used to initialize the variable or null of there is no initialization. |
String |
getName()
the name of the variable |
ClassNode |
getOriginType()
the type before wrapping primitives type of the variable |
ClassNode |
getType()
the type of the variable |
boolean |
hasInitialExpression()
returns true if there is an initialization expression |
boolean |
isClosureSharedVariable()
|
boolean |
isDynamicTyped()
|
boolean |
isInStaticContext()
returns true if this variable is used in a static context. |
void |
setClosureSharedVariable(boolean inClosure)
|
void |
setInitialExpression(Expression init)
|
void |
setInStaticContext(boolean inStaticContext)
|
void |
setType(ClassNode type)
|
String |
toString()
|
| Methods inherited from class org.codehaus.groovy.ast.AnnotatedNode |
|---|
addAnnotation, addAnnotations, getAnnotations, getAnnotations, getDeclaringClass, isSynthetic, setDeclaringClass, setSynthetic |
| Methods inherited from class org.codehaus.groovy.ast.ASTNode |
|---|
getColumnNumber, getLastColumnNumber, getLastLineNumber, getLineNumber, getText, setColumnNumber, setLastColumnNumber, setLastLineNumber, setLineNumber, setSourcePosition, visit |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final Parameter[] EMPTY_ARRAY
| Constructor Detail |
|---|
public Parameter(ClassNode type,
String name)
public Parameter(ClassNode type,
String name,
Expression defaultValue)
| Method Detail |
|---|
public String toString()
toString in class Objectpublic String getName()
Variable
getName in interface Variablepublic ClassNode getType()
Variable
getType in interface Variablepublic void setType(ClassNode type)
public boolean hasInitialExpression()
Variable
hasInitialExpression in interface Variablepublic Expression getInitialExpression()
Variable
getInitialExpression in interface Variablepublic void setInitialExpression(Expression init)
public boolean isInStaticContext()
Variable
isInStaticContext in interface Variablepublic void setInStaticContext(boolean inStaticContext)
public boolean isDynamicTyped()
isDynamicTyped in interface Variablepublic boolean isClosureSharedVariable()
isClosureSharedVariable in interface Variablepublic void setClosureSharedVariable(boolean inClosure)
setClosureSharedVariable in interface Variablepublic ClassNode getOriginType()
Variable
getOriginType in interface Variable
|
Copyright © 2003-2009 The Codehaus. All rights reserved. | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||