Class JParameter
- java.lang.Object
-
- org.codehaus.modello.plugin.java.javasource.JParameter
-
public class JParameter extends java.lang.Object
Represents a parameter to a JMethod.- Version:
- $Revision$ $Date$
-
-
Field Summary
Fields Modifier and Type Field Description private JAnnotations
annotations
private java.lang.String
name
The name of this JParameterprivate JType
type
The type associated with this JParameter
-
Constructor Summary
Constructors Constructor Description JParameter(JType type, java.lang.String name)
Creates a new JParameter with the given type, and name
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
appendAnnotation(java.lang.String annotation)
JAnnotations
getAnnotations()
java.lang.String
getName()
Returns the name of the parameterJType
getType()
Returns the parameter typevoid
setAnnotations(JAnnotations annotations)
void
setName(java.lang.String name)
Sets the name of this parametervoid
setType(JType type)
Sets the type of this parameterjava.lang.String
toString()
Returns the String representation of this JParameter.
-
-
-
Field Detail
-
type
private JType type
The type associated with this JParameter
-
name
private java.lang.String name
The name of this JParameter
-
annotations
private JAnnotations annotations
-
-
Constructor Detail
-
JParameter
public JParameter(JType type, java.lang.String name) throws java.lang.IllegalArgumentException
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:
java.lang.IllegalArgumentException
-
-
Method Detail
-
getName
public java.lang.String getName()
Returns the name of the parameter- Returns:
- the name of the parameter
-
getType
public JType getType()
Returns the parameter type- Returns:
- the parameter type
-
setName
public void setName(java.lang.String name)
Sets the name of this parameter- Parameters:
name
- the new name of the parameter
-
setType
public void setType(JType type) throws java.lang.IllegalArgumentException
Sets the type of this parameter- Parameters:
type
- the new type of this parameter- Throws:
java.lang.IllegalArgumentException
-
toString
public java.lang.String 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- Overrides:
toString
in classjava.lang.Object
- Returns:
- the String representation of this JParameter
-
getAnnotations
public JAnnotations getAnnotations()
- Returns:
- the annotations
-
appendAnnotation
public void appendAnnotation(java.lang.String annotation)
- Parameters:
annotation
- the annotation to append
-
setAnnotations
public void setAnnotations(JAnnotations annotations)
- Parameters:
annotations
- the annotations to set
-
-