Class UncopiedElementsContainer


  • class UncopiedElementsContainer
    extends java.lang.Object
    Stores elements of the ProjectCopyVisitor, which could not be copied completely as dependent elements are not copied, yet.
    Each element type is stored in a separate set to facilitate individual treatment and to allow that the elements can be processed in an optimized order.
    Author:
    El-Sharkawy
    • Constructor Detail

      • UncopiedElementsContainer

        UncopiedElementsContainer()
    • Method Detail

      • addUnresolvedType

        void addUnresolvedType​(CustomDatatype unresolvedType)
        Adds a custom data type which could not be translated as it is dependent of another custom data type, which hasn't been copied so far.
        Parameters:
        unresolvedType - The unresolved data type, which still has to be translated.
      • getUnresolvedTypes

        java.util.Set<CustomDatatype> getUnresolvedTypes()
        Returns the set of all unresolved (original) data types which could not be translated so far.
        Returns:
        The unresolved data types
      • addUnresolvedAnnotation

        void addUnresolvedAnnotation​(Attribute originalAttribute)
        Adds an annotation, which could not be translated so far (due to missing attributable element or type).
        Parameters:
        originalAttribute - The original attribute which could not be translated at this moment.
      • addUnresolvedDeclarationType

        void addUnresolvedDeclarationType​(AbstractVariable declWithUnresolvedType)
        Adds an AbstractVariable, which could not be translated so far (due to missing type).
        Parameters:
        declWithUnresolvedType - The original declaration which could not be translated at this moment.
      • getDeclarationsWithMissingTypes

        java.util.Set<AbstractVariable> getDeclarationsWithMissingTypes()
        Returns the set of original declarations, which could not be translated due to missing CustomDatatypes. This set may be changed as a side effect during resolving default values.
        Returns:
        Declarations which could not be translated.
      • addUnresolvedProjectInterface

        void addUnresolvedProjectInterface​(ProjectInterface orgInterface)
        Adds an original ProjectInterface, which could not be copied, as some of the exported declarations are not already copied.
        Parameters:
        orgInterface - The original project interface, which must be copied at a later point.
      • getUnresolvedProjectInterfaces

        java.util.Set<ProjectInterface> getUnresolvedProjectInterfaces()
        Returns the set of uncopied project interfaces, which still has to be copied. This set may be changed as a side effect during successful copying.
        Returns:
        The set of outstanding interfaces.
      • addIncompleteOperation

        void addIncompleteOperation​(OperationDefinition incompleteOperation)
        Adds a copied OperationDefinition, of which the nested {@link {@link net.ssehub.easy.varModel.cst.ConstraintSyntaxTree}} could not be copied.
        Parameters:
        incompleteOperation - The incomplete OperationDefinition of which the cst must be fixed at a later time.
      • getIncompleteOperations

        java.util.Set<OperationDefinition> getIncompleteOperations()
        Returns the set of incompletely copied OperationDefinitions of which the nested {@link {@link net.ssehub.easy.varModel.cst.ConstraintSyntaxTree}} must be corrected.
        Returns:
        The set of incomplete OperationDefinitions.
      • addUnCopiedOperation

        void addUnCopiedOperation​(OperationDefinition notCopiedOperation)
        Adds an original OperationDefinition, which could not be copied at all.
        Parameters:
        notCopiedOperation - An original and not copied operation definition, which must be copied at a later time.
      • addFreezeBlock

        void addFreezeBlock​(FreezeBlock notCopiedBlock)
        Adds an original FreezeBlock, which could not be copied at all. This block is depending on uncopied frozen elements or on an uncopyable FreezeBlock.getIter()
        Parameters:
        notCopiedBlock - An original and not copied FreezeBlock.
      • getUncopiedFreezeBlocks

        java.util.Set<FreezeBlock> getUncopiedFreezeBlocks()
        Returns the set of FreezeBlocks, which could not be copied.
        Returns:
        The set original FreezeBlocks which still have to be copied.
      • addUncopyableCST

        void addUncopyableCST​(ContainableModelElement copiedParent,
                              ConstraintSyntaxTree originalCST)
        Adds an CST which could not be copied so far, also not partially.
        Parameters:
        copiedParent - The already copied declaration or constraint to where the cst belongs to
        originalCST - The original syntax, which can not be copied (even partially)
      • getUnresolvedElements

        java.util.List<UncopiedElement> getUnresolvedElements()
        Maybe called after ProjectCopyVisitor.getCopiedProject() to verify that all elements could successfully be copied.
        Returns:
        A list of failing elements, should be empty if copying was successful.