'DRY Helper method to filter component hooks
@param components: components already found, dict {alias: component}
@param hooks: component hooks to filter, dict {alias: hook}
@param names: the names (=aliases) to include
@param supertable: the super-table name to set for the component
@returns: set of names that could not be found,
or None if names was None'

@classmethod
def __get_hooks(cls, components, hooks, names=None, supertable=None):

    for alias in hooks:
        if ((alias in components) or ((names is not None) and (alias not in names))):
            continue
        hook = hooks[alias]
        hook['supertable'] = supertable
        components[alias] = hook
    return ((set(names) - set(hooks)) if (names is not None) else None)
