Class SimpleGroovyParameter
java.lang.Object
org.codehaus.groovy.tools.groovydoc.SimpleGroovyParameter
- All Implemented Interfaces:
GroovyParameter
Default
GroovyParameter implementation.-
Constructor Summary
ConstructorsConstructorDescriptionSimpleGroovyParameter(String name) Creates a documented parameter with the supplied name. -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds an annotation reference declared on this parameter.Returns the annotations declared on this parameter.Returns the default value expression declared for this parameter.booleanIndicates whether the parameter type has been resolved.name()Returns the parameter name.voidsetDefaultValue(String defaultValue) Stores the default value expression declared for this parameter.voidsetType(GroovyType type) Sets the resolved parameter type for later class resolution.voidsetTypeName(String typeName) Stores the unresolved type name declared for this parameter.voidsetVararg(boolean vararg) Sets whether this parameter is variadic.type()Returns the resolved parameter type.typeName()Returns the parameter type name as declared in source.booleanvararg()Indicates whether this parameter is variadic.
-
Constructor Details
-
SimpleGroovyParameter
Creates a documented parameter with the supplied name.- Parameters:
name- the parameter name
-
-
Method Details
-
defaultValue
Returns the default value expression declared for this parameter.- Specified by:
defaultValuein interfaceGroovyParameter- Returns:
- the default value expression, or
nullif none is declared
-
setDefaultValue
Stores the default value expression declared for this parameter.- Parameters:
defaultValue- the default value expression
-
name
Returns the parameter name.- Specified by:
namein interfaceGroovyParameter- Returns:
- the parameter name
-
typeName
Returns the parameter type name as declared in source.- Specified by:
typeNamein interfaceGroovyParameter- Returns:
- the declared type name
-
setTypeName
Stores the unresolved type name declared for this parameter.- Parameters:
typeName- the declared type name
-
annotations
Returns the annotations declared on this parameter.- Specified by:
annotationsin interfaceGroovyParameter- Returns:
- the parameter annotations
-
addAnnotationRef
Adds an annotation reference declared on this parameter.- Parameters:
ref- the annotation reference to add
-
type
Returns the resolved parameter type.- Specified by:
typein interfaceGroovyParameter- Returns:
- the parameter type, or
nullif it is unavailable
-
setType
Sets the resolved parameter type for later class resolution.- Parameters:
type- the resolved parameter type
-
isTypeAvailable
public boolean isTypeAvailable()Indicates whether the parameter type has been resolved.- Returns:
trueif the parameter type is available
-
vararg
public boolean vararg()Indicates whether this parameter is variadic.- Returns:
trueif this parameter is variadic
-
setVararg
public void setVararg(boolean vararg) Sets whether this parameter is variadic.- Parameters:
vararg-trueif this parameter is variadic
-