Class PostProcessorRegistryImpl
- java.lang.Object
-
- org.eclipse.emf.compare.rcp.internal.postprocessor.PostProcessorRegistryImpl
-
- All Implemented Interfaces:
IPostProcessor.Descriptor.Registry<String>
public class PostProcessorRegistryImpl extends Object implements IPostProcessor.Descriptor.Registry<String>
IPostProcessor.Descriptor.Registry implementation based on wrapping aIItemRegistry
.- See Also:
IItemRegistry
-
-
Constructor Summary
Constructors Constructor Description PostProcessorRegistryImpl(IItemRegistry<IPostProcessor.Descriptor> baseRegisty)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clear()
Removes all extensions from this registry.List<IPostProcessor.Descriptor>
getDescriptors()
This will return a copy of the registered post processors list.List<IPostProcessor>
getPostProcessors(IComparisonScope scope)
Retrieve the post processors from a givenscope
.IPostProcessor.Descriptor
put(String key, IPostProcessor.Descriptor descriptor)
Adds a post processor to the registry.IPostProcessor.Descriptor
remove(String key)
Removes a post processor from this registry.
-
-
-
Constructor Detail
-
PostProcessorRegistryImpl
public PostProcessorRegistryImpl(IItemRegistry<IPostProcessor.Descriptor> baseRegisty)
Constructor.- Parameters:
baseRegisty
-IItemDescriptor
filled withIItemDescriptor
ofIPostProcessor.Descriptor
.
-
-
Method Detail
-
put
public IPostProcessor.Descriptor put(String key, IPostProcessor.Descriptor descriptor)
Adds a post processor to the registry.- Specified by:
put
in interfaceIPostProcessor.Descriptor.Registry<String>
- Parameters:
key
- key with which the specified descriptor is to be associateddescriptor
- Post Processor that is to be added to this registry.- Returns:
- the previous descriptor associated with key, or null if there was no mapping for key. (A null return can also indicate that the map previously associated null with key, if the implementation supports null values.)
-
clear
public void clear()
Removes all extensions from this registry.- Specified by:
clear
in interfaceIPostProcessor.Descriptor.Registry<String>
-
getDescriptors
public List<IPostProcessor.Descriptor> getDescriptors()
This will return a copy of the registered post processors list.- Specified by:
getDescriptors
in interfaceIPostProcessor.Descriptor.Registry<String>
- Returns:
- A copy of the registered post processors list.
-
remove
public IPostProcessor.Descriptor remove(String key)
Removes a post processor from this registry.- Specified by:
remove
in interfaceIPostProcessor.Descriptor.Registry<String>
- Parameters:
key
- key of the post processor descriptor that is to be removed from the registry.- Returns:
- the previous value associated with key, or null if there was no mapping for key.
-
getPostProcessors
public List<IPostProcessor> getPostProcessors(IComparisonScope scope)
Retrieve the post processors from a givenscope
. The scope provides the set of scanned namespaces and resource uris. If they match with the regex of some post processors, then they are returned.- Specified by:
getPostProcessors
in interfaceIPostProcessor.Descriptor.Registry<String>
- Parameters:
scope
- The given scope.- Returns:
- The associated post processors if any.
- See Also:
IPostProcessor.Descriptor.Registry.getPostProcessors(org.eclipse.emf.compare.scope.IComparisonScope)
-
-