## javax.media.jai
Class RegistryMode

    java.lang.Object
      |
      +--javax.media.jai.RegistryMode

Direct Known Subclasses:
  CollectionRegistryMode, RemoteRenderableRegistryMode, RemoteRenderedRegistryMode, RenderableCollectionRegistryMode, RenderableRegistryMode, RenderedRegistryMode, TileDecoderRegistryMode, TileEncoderRegistryMode

public class RegistryMode
extends java.lang.Object

A class which provides information about a registry mode. The static methods of the class act to maintain a global list of known modes. All `RegistryMode`s known to JAI are added to this list when this class is loaded. The `RegistryMode`s installed by JAI cannot be replaced or removed. The `String`s used to represent the registry modes are all used in a case-insensitive manner.

Since:
  Java Advanced Imaging 1.1

Constructor Summary
`protected` `RegistryMode(java.lang.String name, java.lang.Class descriptorClass, java.lang.Class productClass, java.lang.reflect.Method factoryMethod, boolean arePreferencesSupported, boolean arePropertiesSupported)` Constructor.

Method Summary
`static boolean` `addMode(RegistryMode mode)` Adds a new `RegistryMode` to the existing list.
`boolean` `arePreferencesSupported()` Does this registry mode support preferences ?
`boolean` `arePropertiesSupported()` Are properties to be managed for this registry mode ?
`java.lang.Class` `getDescriptorClass()` Returns the descriptor class that corresponds to this registry mode.
`static java.util.Set` `getDescriptorClasses()` Get a `Set` of all descriptor classes over all registry modes.
`java.lang.Class` `getFactoryClass()` A convenience method which essentially returns getFactoryMethod().getDeclaringClass()
`java.lang.reflect.Method` `getFactoryMethod()` Get the factory method that corresponds to "create"
`static RegistryMode` `getMode(java.lang.String name)` Get the registry mode corresponding to this name.
`static java.lang.String[]` `getModeNames()` Get the list of the known registry mode names.
`static java.lang.String[]` `getModeNames(java.lang.Class descriptorClass)` Get a list of all known registry modes associated with the specified `descriptorClass`.
`java.lang.String` `getName()` Get the registry mode name (case-preserved)
`java.lang.Class` `getProductClass()` The `Class` of the objects produced by this registry mode.
`static boolean` `removeMode(java.lang.String name)` Removes a mode from the existing list of known registryModes.

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

Constructor Detail

### RegistryMode

    protected RegistryMode(java.lang.String name,
                           java.lang.Class descriptorClass,
                           java.lang.Class productClass,
                           java.lang.reflect.Method factoryMethod,
                           boolean arePreferencesSupported,
                           boolean arePropertiesSupported)

  Constructor. Protected access allows only instantiation of subclasses.
  Parameters:
    `name` - name of the registry mode
    `descriptorClass` - the specific sub-class of `RegistryElementDescriptor` associated with this registry mode.
    `productClass` - the `Class` of the objects produced by this registry mode. This would typically be `factoryMethod.getReturnType()`.
    `factoryMethod` - the method used to "create" an object.
    `arePreferencesSupported` - does this registry mode support preferences between products or instances of the "modes"
    `arePropertiesSupported` - do properties have to be managed for this registry mode.

Method Detail

### addMode

    public static boolean addMode(RegistryMode mode)

  Adds a new `RegistryMode` to the existing list. This succeeds only if the mode is not already present in the list. New `RegistryMode` names can not clash (in a case insensitive manner) with the ones installed by JAI (done statically when this class is loaded)
  Parameters:
    `mode` - the new RegistryMode to be added to list
  Returns:
    false if the mode was already in the list. true otherwise

### removeMode

    public static boolean removeMode(java.lang.String name)

  Removes a mode from the existing list of known registryModes. If the mode is one of the JAI-installed ones, it can not be removed.

### getModeNames

    public static java.lang.String[] getModeNames()

  Get the list of the known registry mode names.

### getModeNames

    public static java.lang.String[] getModeNames(java.lang.Class descriptorClass)

  Get a list of all known registry modes associated with the specified `descriptorClass`.
  Parameters:
    `descriptorClass` - a `Class`

### getMode

    public static RegistryMode getMode(java.lang.String name)

  Get the registry mode corresponding to this name.

### getDescriptorClasses

    public static java.util.Set getDescriptorClasses()

  Get a `Set` of all descriptor classes over all registry modes.

### getName

    public final java.lang.String getName()

  Get the registry mode name (case-preserved)

### getFactoryMethod

    public final java.lang.reflect.Method getFactoryMethod()

  Get the factory method that corresponds to "create"

### arePreferencesSupported

    public final boolean arePreferencesSupported()

  Does this registry mode support preferences ?

### arePropertiesSupported

    public final boolean arePropertiesSupported()

  Are properties to be managed for this registry mode ?

### getDescriptorClass

    public final java.lang.Class getDescriptorClass()

  Returns the descriptor class that corresponds to this registry mode. For eg. this would be OperationDescriptor for rendered, renderable, collection ... and TileCodecDescriptor for tilecodec etc.

### getProductClass

    public final java.lang.Class getProductClass()

  The `Class` of the objects produced by this registry mode.

### getFactoryClass

    public final java.lang.Class getFactoryClass()

  A convenience method which essentially returns getFactoryMethod().getDeclaringClass()