## org.eclipse.emf.codegen.ecore.generator
Class GeneratorAdapterFactory.Descriptor.DelegatingRegistry

    java.lang.Object
      org.eclipse.emf.codegen.ecore.generator.GeneratorAdapterFactory.Descriptor.DelegatingRegistry

All Implemented Interfaces:
  GeneratorAdapterFactory.Descriptor.Registry

Enclosing interface:
  GeneratorAdapterFactory.Descriptor

    public static class GeneratorAdapterFactory.Descriptor.DelegatingRegistry

extends java.lang.Object
implements GeneratorAdapterFactory.Descriptor.Registry

A simple `Registry` implementation, in which `getDescriptors(String)` can delegate to another `Registry` if no descriptors are locally registered against the given package ID. This implementation does not prevent duplicate registrations.

Field Summary
`protected GeneratorAdapterFactory.Descriptor.Registry` `delegateRegistry`
`protected java.util.Map<java.lang.String,java.util.List<GeneratorAdapterFactory.Descriptor>>` `map`

Fields inherited from interface org.eclipse.emf.codegen.ecore.generator.GeneratorAdapterFactory.Descriptor.Registry
`INSTANCE`

Constructor Summary
`GeneratorAdapterFactory.Descriptor.DelegatingRegistry()`
`GeneratorAdapterFactory.Descriptor.DelegatingRegistry(GeneratorAdapterFactory.Descriptor.Registry delegateRegistry)`

Method Summary
`boolean` `addDescriptor(java.lang.String packageID, GeneratorAdapterFactory.Descriptor descriptor)` Registers the given descriptor against the specified package ID.
`void` `clear()` Clears the registry of all descriptor registrations.
`protected java.util.Collection<GeneratorAdapterFactory.Descriptor>` `delegatedGetDescriptors(java.lang.String packageID)`
`java.util.Collection<GeneratorAdapterFactory.Descriptor>` `getDescriptors(java.lang.String packageID)` Returns the descriptors registered against the given package ID.
`protected java.util.List<GeneratorAdapterFactory.Descriptor>` `getDescriptors(java.lang.String packageID, boolean forceCreate)`
`boolean` `removeDescriptor(java.lang.String packageID, GeneratorAdapterFactory.Descriptor descriptor)` Removes the given descriptor from the collection registered against the given package ID.
`boolean` `removeDescriptors(java.lang.String packageID)` Deregisters all descriptors for a given package ID.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### delegateRegistry

    protected GeneratorAdapterFactory.Descriptor.Registry delegateRegistry

### map

    protected java.util.Map<java.lang.String,java.util.List<GeneratorAdapterFactory.Descriptor>> map

Constructor Detail

### GeneratorAdapterFactory.Descriptor.DelegatingRegistry

    public GeneratorAdapterFactory.Descriptor.DelegatingRegistry()

### GeneratorAdapterFactory.Descriptor.DelegatingRegistry

    public GeneratorAdapterFactory.Descriptor.DelegatingRegistry(GeneratorAdapterFactory.Descriptor.Registry delegateRegistry)

Method Detail

### getDescriptors

    public java.util.Collection<GeneratorAdapterFactory.Descriptor> getDescriptors(java.lang.String packageID)

  Description copied from interface: `GeneratorAdapterFactory.Descriptor.Registry`
  Returns the descriptors registered against the given package ID.

  Specified by:
    `getDescriptors` in interface `GeneratorAdapterFactory.Descriptor.Registry`

### delegatedGetDescriptors

    protected java.util.Collection<GeneratorAdapterFactory.Descriptor> delegatedGetDescriptors(java.lang.String packageID)

### addDescriptor

    public boolean addDescriptor(java.lang.String packageID,
                                 GeneratorAdapterFactory.Descriptor descriptor)

  Description copied from interface: `GeneratorAdapterFactory.Descriptor.Registry`
  Registers the given descriptor against the specified package ID.

  Specified by:
    `addDescriptor` in interface `GeneratorAdapterFactory.Descriptor.Registry`
  Returns:
    whether the descriptor was added to the collection of descriptors for that package ID.

### removeDescriptor

    public boolean removeDescriptor(java.lang.String packageID,
                                    GeneratorAdapterFactory.Descriptor descriptor)

  Description copied from interface: `GeneratorAdapterFactory.Descriptor.Registry`
  Removes the given descriptor from the collection registered against the given package ID.

  Specified by:
    `removeDescriptor` in interface `GeneratorAdapterFactory.Descriptor.Registry`
  Returns:
    whether the descriptor was deregistered (this should be true if it was previously registered against that package ID).

### removeDescriptors

    public boolean removeDescriptors(java.lang.String packageID)

  Description copied from interface: `GeneratorAdapterFactory.Descriptor.Registry`
  Deregisters all descriptors for a given package ID.

  Specified by:
    `removeDescriptors` in interface `GeneratorAdapterFactory.Descriptor.Registry`
  Returns:
    whether any descriptors were deregistered (this should be true if any descriptor was previously registered against it).

### clear

    public void clear()

  Description copied from interface: `GeneratorAdapterFactory.Descriptor.Registry`
  Clears the registry of all descriptor registrations.

  Specified by:
    `clear` in interface `GeneratorAdapterFactory.Descriptor.Registry`

### getDescriptors

    protected java.util.List<GeneratorAdapterFactory.Descriptor> getDescriptors(java.lang.String packageID,
                                                                                boolean forceCreate)

Copyright 2001-2006 IBM Corporation and others. All Rights Reserved.