public class JParameter
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private JAnnotations |
annotations |
private java.lang.String |
name
The name of this JParameter
|
private JType |
type
The type associated with this JParameter
|
Constructor and Description |
---|
JParameter(JType type,
java.lang.String name)
Creates a new JParameter with the given type, and name
|
Modifier and Type | Method and Description |
---|---|
void |
appendAnnotation(java.lang.String annotation) |
JAnnotations |
getAnnotations() |
java.lang.String |
getName()
Returns the name of the parameter
|
JType |
getType()
Returns the parameter type
|
void |
setAnnotations(JAnnotations annotations) |
void |
setName(java.lang.String name)
Sets the name of this parameter
|
void |
setType(JType type)
Sets the type of this parameter
|
java.lang.String |
toString()
Returns the String representation of this JParameter.
|
private JType type
private java.lang.String name
private JAnnotations annotations
public JParameter(JType type, java.lang.String name) throws java.lang.IllegalArgumentException
type
- the type to associate with this JParametername
- the name of the JParameterjava.lang.IllegalArgumentException
public java.lang.String getName()
public JType getType()
public void setName(java.lang.String name)
name
- the new name of the parameterpublic void setType(JType type) throws java.lang.IllegalArgumentException
type
- the new type of this parameterjava.lang.IllegalArgumentException
public java.lang.String toString()
toString
in class java.lang.Object
public JAnnotations getAnnotations()
public void appendAnnotation(java.lang.String annotation)
annotation
- the annotation to appendpublic void setAnnotations(JAnnotations annotations)
annotations
- the annotations to set