Class SetReturningOperation


  • public class SetReturningOperation
    extends Operation
    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
    • Constructor Detail

      • SetReturningOperation

        SetReturningOperation​(IDatatype returns,
                              java.lang.String name,
                              IDatatype operand,
                              IDatatype... parameters)
        Creates a non-container operation (descriptor). The return type mode is Operation.ReturnTypeMode.UNCHANGED by default. Use Operation.markAsContainerOperation() to flag this operation as a container operation.
        Parameters:
        returns - result type of the operation
        name - name of the operation
        operand - the data type the operation is defined for
        parameters - list of parameters for operation
      • SetReturningOperation

        SetReturningOperation​(IDatatype returns,
                              Operation.ReturnTypeMode returnTypeMode,
                              java.lang.String name,
                              IDatatype operand,
                              IDatatype... parameters)
        Creates an operation (descriptor). Use Operation.markAsContainerOperation() to flag this operation as a container operation.
        Parameters:
        returns - result type of the operation
        returnTypeMode - the return type mode
        name - name of the operation
        operand - the data type the operation is defined for
        parameters - list of parameters for operation
    • Method Detail

      • createCollectionReturnType

        protected IDatatype createCollectionReturnType​(IDatatype aim,
                                                       IDatatype elementType,
                                                       IModelElement parent)
        Description copied from class: Operation
        Creates a collection return type based on aim. Subclasses may override to limit the actual return type.
        Overrides:
        createCollectionReturnType in class Operation
        Parameters:
        aim - the type aim (Sequence.TYPE or Set.TYPE)
        elementType - the element type
        parent - the parent model element
        Returns:
        the collection return type, null if aim is none of the types given above