org.eclipse.emf.compare.internal.adapterfactory

## Class RankedAdapterFactoryDescriptorRegistryImpl

- java.lang.Object
- - org.eclipse.emf.compare.internal.adapterfactory.RankedAdapterFactoryDescriptorRegistryImpl

All Implemented Interfaces:
  RankedAdapterFactoryDescriptor.Registry, ComposedAdapterFactory.Descriptor.Registry

    public class RankedAdapterFactoryDescriptorRegistryImpl
    extends Object
    implements RankedAdapterFactoryDescriptor.Registry

The default implementation of the `Descriptor.Registry`.

### Nested Class Summary

### Nested classes/interfaces inherited from interface org.eclipse.emf.edit.provider.ComposedAdapterFactory.Descriptor.Registry

`ComposedAdapterFactory.Descriptor.Registry.Impl`

### Field Summary

### Fields inherited from interface org.eclipse.emf.edit.provider.ComposedAdapterFactory.Descriptor.Registry

`INSTANCE`

### Constructor Summary

Constructors
Constructor and Description
`RankedAdapterFactoryDescriptorRegistryImpl(ComposedAdapterFactory.Descriptor.Registry delegateRegistry, com.google.common.collect.Multimap<Collection<?>,RankedAdapterFactoryDescriptor> adapterFactoryRegistryBackingMultimap)` Creates an instance.
`RankedAdapterFactoryDescriptorRegistryImpl(ComposedAdapterFactory.Descriptor.Registry delegateRegistry, com.google.common.collect.Multimap<Collection<?>,RankedAdapterFactoryDescriptor> adapterFactoryRegistryBackingMultimap, Map<Object,Object> context)` Creates an instance.

### Method Summary

All Methods Instance Methods Concrete Methods
`protected ComposedAdapterFactory.Descriptor` `delegatedGetDescriptor(Collection<?> types)` This is called when local lookup fails.
`ComposedAdapterFactory.Descriptor` `getDescriptor(Collection<?> types)` Returns the appropriate Descriptor for the given types.
`Set<RankedAdapterFactoryDescriptor>` `getDescriptors()` Returns all `RankedAdapterFactoryDescriptor` of the registry.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### RankedAdapterFactoryDescriptorRegistryImpl

    public RankedAdapterFactoryDescriptorRegistryImpl(ComposedAdapterFactory.Descriptor.Registry delegateRegistry,
                                                      com.google.common.collect.Multimap<Collection<?>,RankedAdapterFactoryDescriptor> adapterFactoryRegistryBackingMultimap)

Creates an instance.

Parameters:
  `delegateRegistry` - `null` or a registration that should act as the delegate.
  `adapterFactoryRegistryBackingMultimap` - Multimap backing all `RankedAdapterFactoryDescriptor` registered into EMF Compare.

#### RankedAdapterFactoryDescriptorRegistryImpl

    public RankedAdapterFactoryDescriptorRegistryImpl(ComposedAdapterFactory.Descriptor.Registry delegateRegistry,
                                                      com.google.common.collect.Multimap<Collection<?>,RankedAdapterFactoryDescriptor> adapterFactoryRegistryBackingMultimap,
                                                      Map<Object,Object> context)

Creates an instance.

Parameters:
  `delegateRegistry` - `null` or a registration that should act as the delegate.
  `adapterFactoryRegistryBackingMultimap` - Multimap backing all `RankedAdapterFactoryDescriptor` registered into EMF Compare.
  `context` - context for which factories can be registered. This context cannot be null but may be empty.
Throws:
  `NullPointerException` - if `context` is null.

### Method Detail

#### getDescriptor

    public ComposedAdapterFactory.Descriptor getDescriptor(Collection<?> types)

Returns the appropriate Descriptor for the given types. Returns uppermost the ranked adapter factory descriptor with the highest ranking. If no ranked adapter factory descriptor found, delegates to the delegate registry.

Specified by:
  `getDescriptor` in interface `ComposedAdapterFactory.Descriptor.Registry`
Parameters:
  `types` - the given types.
Returns:
  the appropriate Descriptor for the given types.

#### delegatedGetDescriptor

    protected ComposedAdapterFactory.Descriptor delegatedGetDescriptor(Collection<?> types)

This is called when local lookup fails.

Parameters:
  `types` - the given types.
Returns:
  the appropriate Descriptor for the given types.

#### getDescriptors

    public Set<RankedAdapterFactoryDescriptor> getDescriptors()

Returns all `RankedAdapterFactoryDescriptor` of the registry.

Specified by:
  `getDescriptors` in interface `RankedAdapterFactoryDescriptor.Registry`
Returns:
  an immutable `Set` of `RankedAdapterFactoryDescriptor`
See Also:
  `getDescriptors()}`