@staticmethod
def setExcludeEntries(exclude, entries):
    """
        Set the Exclude object from the array of ExcludeEntry.

        :param Exclude exclude: The Exclude object to update.
        :param Array<ExcludeEntry> entries: The array of ExcludeEntry.
        """
    exclude.clear()
    for i in range(len(entries)):
        entry = entries[i]
        if i == 0 and entry._component.getValue().size(
            ) == 0 and entry._anyFollowsComponent:
            exclude.appendAny()
        else:
            exclude.appendComponent(entry._component)
            if entry._anyFollowsComponent:
                exclude.appendAny()
