Package org.exolab.javasource
Class JParameter
- java.lang.Object
-
- org.exolab.javasource.JAnnotatedElementHelper
-
- org.exolab.javasource.JParameter
-
- All Implemented Interfaces:
JAnnotatedElement
public final class JParameter extends JAnnotatedElementHelper
Represents a parameter to a JMethod.- Version:
- $Revision: 7918 $ $Date: 2005-03-05 06:42:06 -0700 (Sat, 05 Mar 2005) $
- Author:
- Keith Visco
-
-
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 java.lang.String
getName()
Returns the name of the parameter.JType
getType()
Returns the parameter type.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.-
Methods inherited from class org.exolab.javasource.JAnnotatedElementHelper
addAnnotation, getAnnotation, getAnnotations, hasAnnotations, isAnnotationPresent, printAnnotations, removeAnnotation
-
-
-
-
Constructor Detail
-
JParameter
public JParameter(JType type, java.lang.String name)
Creates a new JParameter with the given type, and name.- Parameters:
type
- The JType to associate with this JParameter.name
- Name of the JParameter.
-
-
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)
Sets the type of this parameter.- Parameters:
type
- The new JType of this parameter.
-
toString
public java.lang.String toString()
Returns the String representation of this JParameter. The String returned will consist of the String representation of the parameter type followed by the name of the parameter.- Overrides:
toString
in classjava.lang.Object
-
-