Class BaseMethodInvocation
java.lang.Object
io.github.mmm.code.base.item.BaseItem
io.github.mmm.code.base.expression.BaseExpression
io.github.mmm.code.base.expression.BaseMemberReference
io.github.mmm.code.base.expression.BaseMethodInvocation
- All Implemented Interfaces:
io.github.mmm.code.api.expression.CodeExpression, io.github.mmm.code.api.expression.CodeMemberReference, io.github.mmm.code.api.expression.CodeMethodInvocation, io.github.mmm.code.api.expression.CodeOperationInvocation, io.github.mmm.code.api.item.CodeItem
public class BaseMethodInvocation
extends BaseMemberReference
implements io.github.mmm.code.api.expression.CodeMethodInvocation
Base implementation of
CodeMethodInvocation.- Since:
- 1.0.0
- Author:
- Joerg Hohwiller (hohwille at users.sourceforge.net)
-
Field Summary
Fields inherited from interface io.github.mmm.code.api.item.CodeItem
DEFAULT_INDENT, DEFAULT_NEWLINE -
Constructor Summary
ConstructorsModifierConstructorDescriptionBaseMethodInvocation(BaseMethod method) The constructor.BaseMethodInvocation(BaseMethod method, List<? extends io.github.mmm.code.api.expression.CodeExpression> arguments) The constructor.BaseMethodInvocation(BaseMethod method, List<? extends io.github.mmm.code.api.expression.CodeExpression> arguments, io.github.mmm.code.api.expression.CodeExpression expression) The constructor.protectedBaseMethodInvocation(BaseMethod method, List<? extends io.github.mmm.code.api.expression.CodeExpression> arguments, io.github.mmm.code.api.expression.CodeExpression expression, io.github.mmm.code.api.type.CodeGenericType type, List<? extends io.github.mmm.code.api.type.CodeGenericType> typeParameters) The constructor.BaseMethodInvocation(BaseMethod method, List<? extends io.github.mmm.code.api.expression.CodeExpression> arguments, io.github.mmm.code.api.expression.CodeExpression expression, List<? extends io.github.mmm.code.api.type.CodeGenericType> typeParameters) The constructor.BaseMethodInvocation(BaseMethod method, List<? extends io.github.mmm.code.api.expression.CodeExpression> arguments, io.github.mmm.code.api.type.CodeGenericType type) The constructor.BaseMethodInvocation(BaseMethod method, List<? extends io.github.mmm.code.api.expression.CodeExpression> arguments, io.github.mmm.code.api.type.CodeGenericType type, List<? extends io.github.mmm.code.api.type.CodeGenericType> typeParameters) The constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddoWrite(Appendable sink, String newline, String defaultIndent, String currentIndent, io.github.mmm.code.api.language.CodeLanguage language) io.github.mmm.code.api.expression.CodeConstantevaluate()List<? extends io.github.mmm.code.api.expression.CodeExpression> List<? extends io.github.mmm.code.api.type.CodeGenericType> Methods inherited from class BaseMemberReference
getExpression, getTypeMethods inherited from class BaseItem
getOwningType, getSourceCode, getSpaces, toString, writeMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface io.github.mmm.code.api.item.CodeItem
getLanguage, getSourceCode, write, write, write, write, write, writeMethods inherited from interface io.github.mmm.code.api.expression.CodeMemberReference
getExpression, getType
-
Constructor Details
-
BaseMethodInvocation
The constructor.- Parameters:
method- themethodto invoke.
-
BaseMethodInvocation
public BaseMethodInvocation(BaseMethod method, List<? extends io.github.mmm.code.api.expression.CodeExpression> arguments) The constructor. -
BaseMethodInvocation
public BaseMethodInvocation(BaseMethod method, List<? extends io.github.mmm.code.api.expression.CodeExpression> arguments, io.github.mmm.code.api.type.CodeGenericType type) The constructor. -
BaseMethodInvocation
public BaseMethodInvocation(BaseMethod method, List<? extends io.github.mmm.code.api.expression.CodeExpression> arguments, io.github.mmm.code.api.type.CodeGenericType type, List<? extends io.github.mmm.code.api.type.CodeGenericType> typeParameters) The constructor.- Parameters:
method- themethodto invoke.arguments- theargumentsfor the method invocation.type- the optionaltype.typeParameters- the optionaltype parameters.
-
BaseMethodInvocation
public BaseMethodInvocation(BaseMethod method, List<? extends io.github.mmm.code.api.expression.CodeExpression> arguments, io.github.mmm.code.api.expression.CodeExpression expression) The constructor.- Parameters:
method- themethodto invoke.arguments- theargumentsfor the method invocation.expression- the optionalexpression.
-
BaseMethodInvocation
public BaseMethodInvocation(BaseMethod method, List<? extends io.github.mmm.code.api.expression.CodeExpression> arguments, io.github.mmm.code.api.expression.CodeExpression expression, List<? extends io.github.mmm.code.api.type.CodeGenericType> typeParameters) The constructor.- Parameters:
method- themethodto invoke.arguments- theargumentsfor the method invocation.expression- the optionalexpression.typeParameters- the optionaltype parameters.
-
BaseMethodInvocation
protected BaseMethodInvocation(BaseMethod method, List<? extends io.github.mmm.code.api.expression.CodeExpression> arguments, io.github.mmm.code.api.expression.CodeExpression expression, io.github.mmm.code.api.type.CodeGenericType type, List<? extends io.github.mmm.code.api.type.CodeGenericType> typeParameters) The constructor.- Parameters:
method- themethodto invoke.arguments- theargumentsfor the method invocation.expression- the optionalexpression.type- the optionaltype.typeParameters- the optionaltype parameters.
-
-
Method Details
-
evaluate
public io.github.mmm.code.api.expression.CodeConstant evaluate()- Specified by:
evaluatein interfaceio.github.mmm.code.api.expression.CodeExpression
-
getArguments
- Specified by:
getArgumentsin interfaceio.github.mmm.code.api.expression.CodeOperationInvocation
-
getTypeParameters
- Specified by:
getTypeParametersin interfaceio.github.mmm.code.api.expression.CodeOperationInvocation
-
getMember
- Specified by:
getMemberin interfaceio.github.mmm.code.api.expression.CodeMemberReference- Specified by:
getMemberin interfaceio.github.mmm.code.api.expression.CodeMethodInvocation- Specified by:
getMemberin interfaceio.github.mmm.code.api.expression.CodeOperationInvocation- Specified by:
getMemberin classBaseMemberReference
-
doWrite
protected void doWrite(Appendable sink, String newline, String defaultIndent, String currentIndent, io.github.mmm.code.api.language.CodeLanguage language) throws IOException - Overrides:
doWritein classBaseMemberReference- Parameters:
sink- theAppendablewhere toappendthe code from thisCodeItem.newline- the newlineString.defaultIndent- theStringused for indentation (e.g. a number of spaces to insert per indent level).currentIndent- the current indent (number of spaces). Initially the empty string (""). Before a recursion thedefaultIndentwill be appended.language- theCodeLanguageto use.- Throws:
IOException- if thrown byAppendable.- See Also:
-