class ClassComponentAliasesGenerator implements ComponentAliasesGenerator {

    @Override
    public Set<String> getAliasesFor(final ComponentDescriptor descriptor,
                                     final Collection<? extends ComponentDescriptor> allDescriptors) {
        final Set<String> aliases = computeAllAliasesFor(descriptor, extractors);
        boolean match = false;
        for (ComponentDescriptor other : allDescriptors) {
            final Set<String> otherAliases = computeAllAliasesFor(other, extractors);
            if (aliases.equals(otherAliases)) {
                if (match) {
                    return Collections.emptySet();
                }
                match = true;
            } else {
                for (final String otherAlias : otherAliases) {
                    if (aliases.contains(otherAlias)) {
                        if (match) {
                            return Collections.emptySet();
                        }
                        match = true;
                        break;
                    }
                }
            }
        }
        return aliases;
    }

    public  ClassComponentAliasesGenerator();

}