A class which holds information about the methods of a JClass. Modelled
closely after the Java Reflection API. This class is part of package which
is used to create source code.
author: Keith Visco version: $Revision: 6676 $ $Date: 2004-12-03 11:57:33 -0700 (Fri, 03 Dec 2004) $
Constructor Summary
public
JMethod(String name) Creates a new JMethod with the given name and "void" return type.
Parameters: name - The method name.
public
JMethod(String name, JType returnType, String returnDoc) Creates a new JMethod with the given name and returnType.
Creates a new JMethod with the given name and returnType. The return type
must not be empty or null. For "void" return types, use
JMethod.JMethod(String) instead of this constructor.
Parameters: name - The method name. Must not be null. Parameters: returnType - The return type of the method. Must not be null. Parameters: returnDoc - Javadoc comment for the @return annotation. Ifnull, a default (and mostly useless) javadoc comment will begenerated.
Adds the given Exception to this JMethod's throws clause.
Parameters: exp - The JClass representing the Exception. Parameters: description - JavaDoc comment explaining when this exception is thrown.
Returns the set of JParameters for this JMethod.
Note: the array is a copy, the parameters in the array are the
actual references.
The set of JParameters for this JMethod.
Sets the JModifiers for this JMethod. This JMethod will use only a copy
of the JModifiers.
Note: The JModifiers will be set in the containing
JMethodSignature. If the JMethodSignature is used by other methods, keep
in mind that it will be changed.
Parameters: modifiers - The JModifiers to set.