Class JParameter
java.lang.Object
org.codehaus.modello.plugin.java.javasource.JParameter
Represents a parameter to a JMethod.
- Version:
- $Revision$ $Date$
- Author:
- Keith Visco
-
Constructor Summary
ConstructorDescriptionJParameter
(JType type, String name) Creates a new JParameter with the given type, and name -
Method Summary
Modifier and TypeMethodDescriptionvoid
appendAnnotation
(String annotation) getName()
Returns the name of the parametergetType()
Returns the parameter typevoid
setAnnotations
(JAnnotations annotations) void
Sets the name of this parametervoid
Sets the type of this parametertoString()
Returns the String representation of this JParameter.
-
Constructor Details
-
JParameter
Creates a new JParameter with the given type, and name- Parameters:
type
- the type to associate with this JParametername
- the name of the JParameter- Throws:
IllegalArgumentException
-
-
Method Details
-
getName
Returns the name of the parameter- Returns:
- the name of the parameter
-
getType
Returns the parameter type- Returns:
- the parameter type
-
setName
Sets the name of this parameter- Parameters:
name
- the new name of the parameter
-
setType
Sets the type of this parameter- Parameters:
type
- the new type of this parameter- Throws:
IllegalArgumentException
-
toString
Returns the String representation of this JParameter. The String returns will consist of the String representation of the parameter type, followed by the name of the parameter -
getAnnotations
- Returns:
- the annotations
-
appendAnnotation
- Parameters:
annotation
- the annotation to append
-
setAnnotations
- Parameters:
annotations
- the annotations to set
-