Class SetReturningOperation
java.lang.Object
net.ssehub.easy.varModel.model.datatypes.Operation
net.ssehub.easy.varModel.model.datatypes.SetReturningOperation
Describes an operation that returns a set as collection, i.e., that does not dynamically
choose, e.g., based on the operand type.
- Author:
- Holger Eichelberger
-
Nested Class Summary
Nested classes/interfaces inherited from class net.ssehub.easy.varModel.model.datatypes.Operation
Operation.FormattingHint, Operation.NestingMode, Operation.ReturnTypeMode -
Constructor Summary
ConstructorsConstructorDescriptionSetReturningOperation(IDatatype returns, String name, IDatatype operand, IDatatype... parameters) Creates a non-container operation (descriptor).SetReturningOperation(IDatatype returns, Operation.ReturnTypeMode returnTypeMode, String name, IDatatype operand, IDatatype... parameters) Creates an operation (descriptor). -
Method Summary
Modifier and TypeMethodDescriptionprotected IDatatypecreateCollectionReturnType(IDatatype aim, IDatatype elementType, IModelElement parent) Creates a collection return type based onaim.Methods inherited from class net.ssehub.easy.varModel.model.datatypes.Operation
acceptsNull, createInfixOperator, createPostfixOperator, createPrefixOperator, getActualReturnType, getAlias, getFormattingHint, getFunction, getName, getNestingMode, getOperand, getOperation, getOperationsCount, getParameter, getParameterCount, getParameterDeclaration, getParameterDefaultValue, getParameterType, getRequiredParameterCount, getReturns, getReturnTypeMode, getSignature, isContainerOperation, isFallback, isStatic, markAsAcceptsNull, markAsAliasOf, markAsAssignableParameterOperation, markAsContainerOperation, markAsFallback, markAsFlatteningContainerOperation, markAsNestingContainerOperation, markByFormattingHint, registerAsOperation, requiresAssignableParameter
-
Constructor Details
-
SetReturningOperation
Creates a non-container operation (descriptor). The return type mode isOperation.ReturnTypeMode.UNCHANGEDby default. UseOperation.markAsContainerOperation()to flag this operation as a container operation.- Parameters:
returns- result type of the operationname- name of the operationoperand- the data type the operation is defined forparameters- list of parameters for operation
-
SetReturningOperation
SetReturningOperation(IDatatype returns, Operation.ReturnTypeMode returnTypeMode, String name, IDatatype operand, IDatatype... parameters) Creates an operation (descriptor). UseOperation.markAsContainerOperation()to flag this operation as a container operation.- Parameters:
returns- result type of the operationreturnTypeMode- the return type modename- name of the operationoperand- the data type the operation is defined forparameters- list of parameters for operation
-
-
Method Details
-
createCollectionReturnType
protected IDatatype createCollectionReturnType(IDatatype aim, IDatatype elementType, IModelElement parent) Description copied from class:OperationCreates a collection return type based onaim. Subclasses may override to limit the actual return type.- Overrides:
createCollectionReturnTypein classOperation- Parameters:
aim- the type aim (Sequence.TYPEorSet.TYPE)elementType- the element typeparent- the parent model element- Returns:
- the collection return type, null if
aimis none of the types given above
-