org.codehaus.modello.generator.java.javasource

Class JParameter

public class JParameter extends Object

Represents a parameter to a JMethod.

Version: $Revision: 149 $ $Date: 2004-09-29 13:32:16 -0400 (Wed, 29 Sep 2004) $

Author: Keith Visco

Constructor Summary
JParameter(JType type, String name)
Creates a new JParameter with the given type, and name
Method Summary
StringgetName()
Returns the name of the parameter
JTypegetType()
Returns the parameter type
voidsetName(String name)
Sets the name of this parameter
voidsetType(JType type)
Sets the type of this parameter
StringtoString()
Returns the String representation of this JParameter.

Constructor Detail

JParameter

public JParameter(JType type, String name)
Creates a new JParameter with the given type, and name

Parameters: type the type to associate with this JParameter the name of the JParameter

Method Detail

getName

public 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(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 type of this parameter

toString

public 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

Returns: the String representation of this JParameter

Copyright © 2001-2008 Codehaus. All Rights Reserved.