Class ConstructorCallExpression
- java.lang.Object
-
- net.ssehub.easy.instantiation.core.model.expressions.Expression
-
- net.ssehub.easy.instantiation.core.model.expressions.AbstractCallExpression
-
- net.ssehub.easy.instantiation.core.model.expressions.CallExpression
-
- net.ssehub.easy.instantiation.core.model.expressions.ConstructorCallExpression
-
- All Implemented Interfaces:
IArgumentProvider
public class ConstructorCallExpression extends CallExpression
Represents a constructor call. ConsidersIInitializableValue.- Author:
- Holger Eichelberger
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class net.ssehub.easy.instantiation.core.model.expressions.CallExpression
CallExpression.CallType
-
-
Field Summary
Fields Modifier and Type Field Description private TypeDescriptor<?>type
-
Constructor Summary
Constructors Constructor Description ConstructorCallExpression(TypeDescriptor<?> type, CallArgument... arguments)Creates a constructor call.ConstructorCallExpression(TypeDescriptor<?> type, Expression... arguments)Creates a constructor call.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Objectaccept(IExpressionVisitor visitor)Visits the expression.protected booleancheckMetaForFirstArgField()Returns whether the field meta type shall be checked in#resolveOperation().protected TypeDescriptor<?>determineOperand()Determines the operand for searching operations on.protected booleandoZeroArgumentTest()Returns whether the zero argument test shall be applied.-
Methods inherited from class net.ssehub.easy.instantiation.core.model.expressions.CallExpression
getArgument, getArgumentsCount, getCallType, getParent, getResolved, getVilSignature, inferType, isDotRightExpression, isIteratingCollectionOperation, isIteratorCall, isOclCompliant, isPlaceholder
-
Methods inherited from class net.ssehub.easy.instantiation.core.model.expressions.AbstractCallExpression
dynamicDispatch, getName, getParameterType, getPrefix, getQualifiedName, getSignature, getVilSignature, isPlaceholder, resolveOperation, resolveOperation, resolveResolvableOperation
-
Methods inherited from class net.ssehub.easy.instantiation.core.model.expressions.Expression
getFormattingHint, replaceEmptyLine
-
-
-
-
Field Detail
-
type
private TypeDescriptor<?> type
-
-
Constructor Detail
-
ConstructorCallExpression
public ConstructorCallExpression(TypeDescriptor<?> type, Expression... arguments) throws VilException
Creates a constructor call.- Parameters:
type- the type to obtain the constructor fromarguments- the arguments- Throws:
VilException- in case that determining the type fails
-
ConstructorCallExpression
public ConstructorCallExpression(TypeDescriptor<?> type, CallArgument... arguments) throws VilException
Creates a constructor call.- Parameters:
type- the type to obtain the constructor fromarguments- the arguments- Throws:
VilException- in case that determining the type fails
-
-
Method Detail
-
doZeroArgumentTest
protected boolean doZeroArgumentTest()
Description copied from class:CallExpressionReturns whether the zero argument test shall be applied.- Overrides:
doZeroArgumentTestin classCallExpression- Returns:
trueif the test shall be applied,falseelse
-
determineOperand
protected TypeDescriptor<?> determineOperand() throws VilException
Determines the operand for searching operations on. Is called byCallExpression.inferType().- Overrides:
determineOperandin classCallExpression- Returns:
- the operand
- Throws:
VilException- in case that determining the operand fails
-
checkMetaForFirstArgField
protected boolean checkMetaForFirstArgField()
Description copied from class:CallExpressionReturns whether the field meta type shall be checked in#resolveOperation().- Overrides:
checkMetaForFirstArgFieldin classCallExpression- Returns:
true
-
accept
public java.lang.Object accept(IExpressionVisitor visitor) throws VilException
Description copied from class:ExpressionVisits the expression.- Overrides:
acceptin classCallExpression- Parameters:
visitor- the visitor- Returns:
- the result of visiting this expression (may be null)
- Throws:
VilException- in case that visiting fails (e.g., execution)
-
-