|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.codemodel.JMethod
public class JMethod
Java method
Method Summary | |
---|---|
JMethod |
_throws(java.lang.Class exception)
|
JMethod |
_throws(JClass exception)
Add an exception to the list of exceptions that this method may throw. |
JBlock |
body()
Get the block that makes up body of this method |
void |
declare(JFormatter f)
|
JMods |
getMods()
|
boolean |
hasSignature(JType[] argTypes)
Returns true if the method has the specified signature. |
JDocComment |
javadoc()
Creates, if necessary, and returns the class javadoc for this JDefinedClass |
JVar[] |
listParams()
Returns all the parameters in an array. |
JType[] |
listParamTypes()
Returns all the parameter types in an array. |
java.lang.String |
name()
|
JVar |
param(java.lang.Class type,
java.lang.String name)
|
JVar |
param(int mods,
java.lang.Class type,
java.lang.String name)
|
JVar |
param(int mods,
JType type,
java.lang.String name)
Add the specified variable to the list of parameters for this method signature. |
JVar |
param(JType type,
java.lang.String name)
|
JType |
type()
Returns the return type. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public JMethod _throws(JClass exception)
exception
- Name of an exception that this method may throwpublic JMethod _throws(java.lang.Class exception)
public JVar param(int mods, JType type, java.lang.String name)
type
- JType of the parameter being addedname
- Name of the parameter being added
public JVar param(JType type, java.lang.String name)
public JVar param(int mods, java.lang.Class type, java.lang.String name)
public JVar param(java.lang.Class type, java.lang.String name)
public java.lang.String name()
public JType type()
public JType[] listParamTypes()
public JVar[] listParams()
public boolean hasSignature(JType[] argTypes)
public JBlock body()
public JDocComment javadoc()
public void declare(JFormatter f)
declare
in interface JDeclaration
public JMods getMods()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |