Package com.sun.codemodel
Class JInvocation
- java.lang.Object
-
- com.sun.codemodel.JExpressionImpl
-
- com.sun.codemodel.JInvocation
-
- All Implemented Interfaces:
JExpression
,JGenerable
,JStatement
public final class JInvocation extends JExpressionImpl implements JStatement
JMethod invocation
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JInvocation
arg(JExpression arg)
Add an expression to this invocation's argument listJInvocation
arg(java.lang.String v)
Adds a literal argument.void
generate(JFormatter f)
JExpression[]
listArgs()
Returns all arguments of the invocation.void
state(JFormatter f)
-
-
-
Method Detail
-
arg
public JInvocation arg(JExpression arg)
Add an expression to this invocation's argument list- Parameters:
arg
- Argument to add to argument list
-
arg
public JInvocation arg(java.lang.String v)
Adds a literal argument. Short forarg(JExpr.lit(v))
-
listArgs
public JExpression[] listArgs()
Returns all arguments of the invocation.- Returns:
- If there's no arguments, an empty array will be returned.
-
generate
public void generate(JFormatter f)
- Specified by:
generate
in interfaceJGenerable
-
state
public void state(JFormatter f)
- Specified by:
state
in interfaceJStatement
-
-