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
ComposedAdapterFactory.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
ConstructorsConstructorDescriptionRankedAdapterFactoryDescriptorRegistryImpl(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
Modifier and TypeMethodDescriptionprotected ComposedAdapterFactory.DescriptordelegatedGetDescriptor(Collection<?> types) This is called when local lookup fails.getDescriptor(Collection<?> types) Returns the appropriate Descriptor for the given types.Returns allRankedAdapterFactoryDescriptorof the registry.
-
Constructor Details
-
RankedAdapterFactoryDescriptorRegistryImpl
public RankedAdapterFactoryDescriptorRegistryImpl(ComposedAdapterFactory.Descriptor.Registry delegateRegistry, com.google.common.collect.Multimap<Collection<?>, RankedAdapterFactoryDescriptor> adapterFactoryRegistryBackingMultimap) Creates an instance.- Parameters:
delegateRegistry-nullor a registration that should act as the delegate.adapterFactoryRegistryBackingMultimap- Multimap backing allRankedAdapterFactoryDescriptorregistered 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-nullor a registration that should act as the delegate.adapterFactoryRegistryBackingMultimap- Multimap backing allRankedAdapterFactoryDescriptorregistered into EMF Compare.context- context for which factories can be registered. This context cannot be null but may be empty.- Throws:
NullPointerException- ifcontextis null.
-
-
Method Details
-
getDescriptor
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:
getDescriptorin interfaceComposedAdapterFactory.Descriptor.Registry- Parameters:
types- the given types.- Returns:
- the appropriate Descriptor for the given types.
-
delegatedGetDescriptor
This is called when local lookup fails.- Parameters:
types- the given types.- Returns:
- the appropriate Descriptor for the given types.
-
getDescriptors
Returns allRankedAdapterFactoryDescriptorof the registry.- Specified by:
getDescriptorsin interfaceRankedAdapterFactoryDescriptor.Registry- Returns:
- an immutable
SetofRankedAdapterFactoryDescriptor
-