public class JInvocation extends AbstractJExpressionImpl implements IJStatement, IJOwnedMaybe
JMethod invocation| Modifier | Constructor and Description |
|---|---|
protected |
JInvocation(AbstractJClass aType,
JMethod aMethod)
Invokes a static method on a class.
|
protected |
JInvocation(AbstractJClass aType,
String sMethodName)
Invokes a static method on a class.
|
protected |
JInvocation(AbstractJType aConstructorType)
Invokes a constructor of an object (i.e., creates a new object.)
|
protected |
JInvocation(IJExpression object,
JMethod method) |
protected |
JInvocation(IJExpression object,
String name)
Invokes a method on an object.
|
| Modifier and Type | Method and Description |
|---|---|
JInvocation |
arg(boolean v)
Adds a literal argument.
|
JInvocation |
arg(char v)
Adds a literal argument.
|
JInvocation |
arg(double v)
Adds a literal argument.
|
JInvocation |
arg(float v)
Adds a literal argument.
|
JInvocation |
arg(IJExpression arg)
Add an expression to this invocation's argument list
|
JInvocation |
arg(int v)
Adds a literal argument.
|
JInvocation |
arg(long v)
Adds a literal argument.
|
JInvocation |
arg(String v)
Adds a literal argument.
|
List<IJExpression> |
args()
Returns all arguments of the invocation.
|
boolean |
equals(Object o) |
void |
generate(JFormatter f) |
int |
hashCode() |
boolean |
isConstructor() |
IJExpression[] |
listArgs()
Returns all arguments of the invocation.
|
JInvocation |
narrow(AbstractJClass bound) |
JInvocation |
narrow(Class<?> bound) |
JInvocation |
narrow(String name) |
JCodeModel |
owner()
Gets the owner code model object.
|
void |
state(JFormatter f) |
List<JTypeVar> |
typeParamList() |
_instanceof, band, bor, cand, complement, component, component, component0, cor, decr, div, div, div, div, div, eq, eq0, eqNull, gt, gt0, gte, gte0, incr, invoke, invoke, lt, lt0, lte, lte0, minus, minus, minus, minus, minus, minus, mod, mul, mul, mul, mul, mul, ne, ne0, neNull, not, plus, plus, plus, plus, plus, plus, predecr, preincr, ref, ref, shl, shl, shr, shr, shrz, shrz, xorprotected JInvocation(@Nullable IJExpression object, @Nonnull String name)
object - JExpression for the object upon which the named method will be
invoked, or null if nonename - Name of method to invokeprotected JInvocation(@Nullable IJExpression object, @Nonnull JMethod method)
protected JInvocation(@Nonnull AbstractJClass aType, @Nonnull String sMethodName)
aType - Parent typesMethodName - Method name to be invokedprotected JInvocation(@Nonnull AbstractJClass aType, @Nonnull JMethod aMethod)
aType - Parent typeaMethod - Method to be invokedprotected JInvocation(@Nonnull AbstractJType aConstructorType)
aConstructorType - Type of the object to be created. If this type is an array type,
added arguments are treated as array initializer. Thus you can
create an expression like new int[]{1,2,3,4,5}.@Nullable public JCodeModel owner()
IJOwnedMaybeowner in interface IJOwnedMaybenull.public boolean isConstructor()
@Nonnull public JInvocation arg(@Nonnull IJExpression arg)
arg - Argument to add to argument list@Nonnull public JInvocation arg(@Nonnull boolean v)
arg(JExpr.lit(v))v - Value to be added to the argument list@Nonnull public JInvocation arg(@Nonnull char v)
arg(JExpr.lit(v))v - Value to be added to the argument list@Nonnull public JInvocation arg(@Nonnull double v)
arg(JExpr.lit(v))v - Value to be added to the argument list@Nonnull public JInvocation arg(@Nonnull float v)
arg(JExpr.lit(v))v - Value to be added to the argument list@Nonnull public JInvocation arg(@Nonnull int v)
arg(JExpr.lit(v))v - Value to be added to the argument list@Nonnull public JInvocation arg(@Nonnull long v)
arg(JExpr.lit(v))v - Value to be added to the argument list@Nonnull public JInvocation arg(@Nonnull String v)
arg(JExpr.lit(v))v - Value to be added to the argument list@Nonnull public IJExpression[] listArgs()
@Nonnull public List<IJExpression> args()
@Nonnull public JInvocation narrow(@Nonnull String name)
@Nonnull public JInvocation narrow(@Nonnull Class<?> bound)
@Nonnull public JInvocation narrow(@Nonnull AbstractJClass bound)
public void generate(@Nonnull JFormatter f)
generate in interface IJGenerablepublic void state(@Nonnull JFormatter f)
state in interface IJStatementCopyright © 2013–2015 Philip Helger. All rights reserved.