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 theComposedAdapterFactory.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 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 Modifier and Type Method Description protected ComposedAdapterFactory.DescriptordelegatedGetDescriptor(Collection<?> types)This is called when local lookup fails.ComposedAdapterFactory.DescriptorgetDescriptor(Collection<?> types)Returns the appropriate Descriptor for the given types.Set<RankedAdapterFactoryDescriptor>getDescriptors()Returns allRankedAdapterFactoryDescriptorof the registry.
-
-
-
Constructor Detail
-
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 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:
getDescriptorin interfaceComposedAdapterFactory.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 allRankedAdapterFactoryDescriptorof the registry.- Specified by:
getDescriptorsin interfaceRankedAdapterFactoryDescriptor.Registry- Returns:
- an immutable
SetofRankedAdapterFactoryDescriptor
-
-