JAnnotatedElementpublic final class JMethodSignature extends JAnnotatedElementHelper
| Constructor | Description | 
|---|---|
JMethodSignature(java.lang.String name) | 
 Creates a new method with the given name and "void" return type. 
 | 
JMethodSignature(java.lang.String name,
                JType returnType) | 
 Creates a new method with the given name and return type. 
 | 
| Modifier and Type | Method | Description | 
|---|---|---|
void | 
addException(JClass exp) | 
 Adds the given Exception to this JMethodSignature's throws clause. 
 | 
void | 
addParameter(JParameter parameter) | 
 Adds the given parameter to this JMethodSignature's list of parameters. 
 | 
JClass[] | 
getExceptions() | 
 Returns the exceptions that this JMethodSignature lists in its throws
 clause. 
 | 
JDocComment | 
getJDocComment() | 
 Returns the JavaDoc comment describing this JMethodSignature. 
 | 
JModifiers | 
getModifiers() | 
 Returns the modifiers for this JMethodSignature. 
 | 
java.lang.String | 
getName() | 
 Returns the name of the method. 
 | 
JParameter | 
getParameter(int index) | 
 Returns the JParameter at the given index. 
 | 
protected java.lang.String[] | 
getParameterClassNames() | 
 Returns an array containing the names of the classes of the parameters in
 this JMethodSignature. 
 | 
JParameter[] | 
getParameters() | 
 Returns the set of JParameters in this JMethodSignature. 
 | 
JType | 
getReturnType() | 
 Returns the JType that represents the return type for the method
 signature. 
 | 
void | 
print(JSourceWriter jsw) | 
 Prints the method signature. 
 | 
void | 
print(JSourceWriter jsw,
     boolean printJavaDoc) | 
 Prints the method signature. 
 | 
void | 
setComment(java.lang.String comment) | 
 Sets the JavaDoc comment describing this JMethodSignature. 
 | 
void | 
setModifiers(JModifiers modifiers) | 
 Sets the JModifiers for this method signature. 
 | 
void | 
setName(java.lang.String name) | 
 Sets the name of the method. 
 | 
java.lang.String | 
toString() | 
addAnnotation, getAnnotation, getAnnotations, hasAnnotations, isAnnotationPresent, printAnnotations, removeAnnotationpublic JMethodSignature(java.lang.String name)
name - The method name. Must not be null.public JMethodSignature(java.lang.String name,
                        JType returnType)
name - The method name. Must not be null.returnType - The return type of the method. Must not be null.public void addException(JClass exp)
exp - The JClass representing the Exception.public void addParameter(JParameter parameter)
parameter - The parameter to add to the this JMethodSignature's list
        of parameters.public JClass[] getExceptions()
public JDocComment getJDocComment()
public JModifiers getModifiers()
public java.lang.String getName()
public JParameter getParameter(int index)
index - The index of the JParameter to return.public JParameter[] getParameters()
public JType getReturnType()
public void setName(java.lang.String name)
name - The name of the method.public void setComment(java.lang.String comment)
comment - The JavaDoc comment for this member.public void setModifiers(JModifiers modifiers)
modifiers - The JModifiers for this method signature.protected java.lang.String[] getParameterClassNames()
public void print(JSourceWriter jsw)
jsw - The JSourceWriter to print to.public void print(JSourceWriter jsw, boolean printJavaDoc)
jsw - The JSourceWriter to print to.printJavaDoc - If true, print the JDocComment associated with this
        method signature before we print the method signature.public java.lang.String toString()
toString in class java.lang.ObjectIntalio Inc. (C) 1999-2008. All rights reserved http://www.intalio.com