public class MethodCall extends Object implements ExpressionOrStatement
NULLAT, CB, CC, CLP, COLN, COMA, CP, DOT, DQ, EMPTY, EQ, EXTENDS, GT, IMPLEMENTS, INDENT, JAVA_LANG, JAVA_LANG_ENUM, JAVA_LANG_OBJECT, JAVA_LANG_STRING, LT, NEWLINE, NEWLINE_PATTERN, OB, OC, OP, Q, SEMICOLN, SEMICOLN_SUFFIX_PATTERN, SPACE, STAR, THROWS, VARARG| Constructor and Description |
|---|
MethodCall(String name,
Class scope,
Expression... arguments) |
MethodCall(String name,
ClassRef scope,
Expression... arguments) |
MethodCall(String name,
Expression scope,
Expression... arguments) |
MethodCall(String name,
Expression scope,
List<TypeRef> parameters,
List<Expression> arguments) |
MethodCall(String name,
Object scope,
Expression... arguments) |
| Modifier and Type | Method and Description |
|---|---|
List<Expression> |
getArguments() |
String |
getName() |
List<TypeRef> |
getParameters() |
Expression |
getScope() |
String |
render()
Render the type into a
String for the purpose of code generation. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitrenderStatementand, and, and, assign, assign, assignNew, assignNew, assignNull, call, call, call, call, cast, cast, cast, cast, createNew, createNew, createNewArray, createNewArray, createNewArray, createNewArray, divide, divide, enclosed, enclosed, eq, eq, index, index, instanceOf, instanceOf, isNull, isNull, lamba, lamba, lamba, minus, minus, minus, modulo, modulo, multiply, multiply, ne, ne, negative, negative, newCall, not, not, notNull, notNull, or, or, or, plus, plus, plus, positive, positive, postDecrement, postIncrement, preIncrement, pretDecrement, property, property, property, renderExpression, ret, ternarynoSemicolon, tabpublic MethodCall(String name, Expression scope, List<TypeRef> parameters, List<Expression> arguments)
public MethodCall(String name, Expression scope, Expression... arguments)
public MethodCall(String name, ClassRef scope, Expression... arguments)
public MethodCall(String name, Class scope, Expression... arguments)
public MethodCall(String name, Object scope, Expression... arguments)
public String getName()
public Expression getScope()
public List<Expression> getArguments()
public String render()
RenderableString for the purpose of code generation.
This is slightly different from the `toString()` method as `toString()` is mostly needed for logging / debugging and should
be idempotent.
Regarding idempotency this method may yield different result based on the context it is used even if the internal state of
the object does not change.
An example of such case, is a reference to class that may change based on the package from which it's refenced.render in interface RenderableString representation of the object as it's meant to appear in the generated code.Copyright © 2023. All rights reserved.