Package org.eclipse.emf.compare.postprocessor

## Class PostProcessorDescriptorRegistryImpl<K>

- java.lang.Object
- - org.eclipse.emf.compare.postprocessor.PostProcessorDescriptorRegistryImpl<K>

Type Parameters:
  `K` - the type of the key of this registry

All Implemented Interfaces:
  `IPostProcessor.Descriptor.Registry<K>`

    public class PostProcessorDescriptorRegistryImpl<K>
    extends Object
    implements IPostProcessor.Descriptor.Registry<K>

This will contain all of the EMF Compare extensions.

### Constructor Summary

Constructors
`PostProcessorDescriptorRegistryImpl()` Creates a new extension registry.

### Method Summary

All Methods Instance Methods Concrete Methods
`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 given `scope`.
`IPostProcessor.Descriptor` `put​(K key, IPostProcessor.Descriptor postProcessor)` Adds a post processor to the registry.
`IPostProcessor.Descriptor` `remove​(K key)` Removes a post processor from this registry.

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

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

### Constructor Detail

#### PostProcessorDescriptorRegistryImpl

    public PostProcessorDescriptorRegistryImpl()

Creates a new extension registry.

### Method Detail

#### clear

    public void clear()

Removes all extensions from this registry.

Specified by:
  `clear` in interface `IPostProcessor.Descriptor.Registry<K>`
See Also:
  `org.eclipse.emf.compare.extension.Registry#clearRegistry()`

#### put

    public IPostProcessor.Descriptor put​(K key,
                                         IPostProcessor.Descriptor postProcessor)

Adds a post processor to the registry.

Specified by:
  `put` in interface `IPostProcessor.Descriptor.Registry<K>`
Parameters:
  `key` - key with which the specified descriptor is to be associated
  `postProcessor` - 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.)
See Also:
  `IPostProcessor.Descriptor.Registry.put(java.lang.Object, org.eclipse.emf.compare.postprocessor.IPostProcessor.Descriptor)`

#### getDescriptors

    public List<IPostProcessor.Descriptor> getDescriptors()

This will return a copy of the registered post processors list.

Specified by:
  `getDescriptors` in interface `IPostProcessor.Descriptor.Registry<K>`
Returns:
  A copy of the registered post processors list.
See Also:
  `IPostProcessor.Descriptor.Registry.getDescriptors()`

#### remove

    public IPostProcessor.Descriptor remove​(K key)

Removes a post processor from this registry.

Specified by:
  `remove` in interface `IPostProcessor.Descriptor.Registry<K>`
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`.
See Also:
  `IPostProcessor.Descriptor.Registry.remove(java.lang.Object)`

#### getPostProcessors

    public List<IPostProcessor> getPostProcessors​(IComparisonScope scope)

Retrieve the post processors from a given `scope`. 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 interface `IPostProcessor.Descriptor.Registry<K>`
Parameters:
  `scope` - The given scope.
Returns:
  The associated post processors if any.
See Also:
  `IPostProcessor.Descriptor.Registry.getPostProcessors(org.eclipse.emf.compare.scope.IComparisonScope)`