Package | Description |
---|---|
com.sun.codemodel |
Library for generating Java source code
|
Modifier and Type | Field and Description |
---|---|
private JMethod |
JInvocation.method |
Modifier and Type | Field and Description |
---|---|
private java.util.List<JMethod> |
JDefinedClass.constructors
Set of constructors for this class, if any
|
private java.util.List<JMethod> |
JDefinedClass.methods
Set of methods that are members of this class
|
Modifier and Type | Method and Description |
---|---|
JMethod |
JMethod._throws(java.lang.Class<? extends java.lang.Throwable> exception) |
JMethod |
JMethod._throws(JClass exception)
Add an exception to the list of exceptions that this
method may throw.
|
JMethod |
JDefinedClass.constructor(int mods)
Adds a constructor to this class.
|
JMethod |
JDefinedClass.getConstructor(JType[] argTypes)
Looks for a method that has the specified method signature
and return it.
|
JMethod |
JDefinedClass.getMethod(java.lang.String name,
JType[] argTypes)
Looks for a method that has the specified method signature
and return it.
|
JMethod |
JDefinedClass.method(int mods,
java.lang.Class<?> type,
java.lang.String name) |
JMethod |
JDefinedClass.method(int mods,
JType type,
java.lang.String name)
Add a method to the list of method members of this JDefinedClass instance.
|
Modifier and Type | Method and Description |
---|---|
java.util.Iterator<JMethod> |
JDefinedClass.constructors()
Returns an iterator that walks the constructors defined in this class.
|
java.util.Collection<JMethod> |
JDefinedClass.methods()
Returns the set of methods defined in this class.
|
Modifier and Type | Method and Description |
---|---|
JInvocation |
JBlock.invoke(JExpression expr,
JMethod method)
Creates an invocation statement and adds it to this block.
|
static JInvocation |
JExpr.invoke(JExpression lhs,
JMethod method) |
JInvocation |
JExpression.invoke(JMethod method)
Returns "[this].[method]".
|
JInvocation |
JBlock.invoke(JMethod method)
Creates an invocation statement and adds it to this block.
|
static JInvocation |
JExpr.invoke(JMethod method) |
JInvocation |
JExpressionImpl.invoke(JMethod method) |
JInvocation |
JClass.staticInvoke(JMethod method)
Generates a static method invocation.
|
Constructor and Description |
---|
JInvocation(JClass type,
JMethod method) |
JInvocation(JExpression object,
JMethod method) |
JInvocation(JGenerable object,
JMethod method) |