Package io.sundr.model
Class MethodCall
- java.lang.Object
-
- io.sundr.model.MethodCall
-
- All Implemented Interfaces:
Expression,ExpressionOrStatement,Node,Renderable,Statement
public class MethodCall extends Object implements ExpressionOrStatement
-
-
Field Summary
-
Fields inherited from interface io.sundr.model.Expression
NULL
-
Fields inherited from interface io.sundr.model.Node
AT, 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 Summary
Constructors Constructor Description 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, Class scope, Expression... arguments)MethodCall(String name, Object scope, Expression... arguments)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<Expression>getArguments()StringgetName()List<TypeRef>getParameters()ExpressiongetScope()Stringrender()Render the type into aStringfor the purpose of code generation.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.sundr.model.Expression
and, and, assign, assign, assignNew, assignNew, assignNull, call, cast, cast, divide, enclosed, eq, index, index, instanceOf, instanceOf, isNull, minus, minus, modulo, multiply, ne, negative, not, notNull, or, or, plus, plus, positive, postDecrement, postIncrement, preIncrement, pretDecrement, property, property, property, renderExpression, ret
-
Methods inherited from interface io.sundr.model.ExpressionOrStatement
renderStatement
-
Methods inherited from interface io.sundr.model.Renderable
tab
-
-
-
-
Constructor Detail
-
MethodCall
public MethodCall(String name, Expression scope, List<TypeRef> parameters, List<Expression> arguments)
-
MethodCall
public MethodCall(String name, Expression scope, Expression... arguments)
-
MethodCall
public MethodCall(String name, ClassRef scope, Expression... arguments)
-
MethodCall
public MethodCall(String name, Class scope, Expression... arguments)
-
MethodCall
public MethodCall(String name, Object scope, Expression... arguments)
-
-
Method Detail
-
getName
public String getName()
-
getScope
public Expression getScope()
-
getArguments
public List<Expression> getArguments()
-
render
public String render()
Description copied from interface:RenderableRender the type into aStringfor 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.- Specified by:
renderin interfaceRenderable- Returns:
- the
Stringrepresentation of the object as it's meant to appear in the generated code.
-
-