org.eclipse.ecf.core

## Class ContainerTypeDescription

- java.lang.Object
- - org.eclipse.ecf.core.ContainerTypeDescription

    public class ContainerTypeDescription
    extends Object

Description of an `IContainer` type. Instances of this class are used to represent `IContainerInstantiator`s in the `ContainerFactory`

See Also:
  `IContainerInstantiator`

### Field Summary

Fields
`protected String` `description`
`protected int` `hashCode`
`protected boolean` `hidden`
`protected IContainerInstantiator` `instantiator`
`protected String` `instantiatorClass`
`protected String` `name`
`protected boolean` `server`

### Constructor Summary

Constructors
Constructor and Description
`ContainerTypeDescription(String name, IContainerInstantiator instantiator)`
`ContainerTypeDescription(String name, IContainerInstantiator instantiator, String description)`
`ContainerTypeDescription(String name, IContainerInstantiator inst, String desc, boolean server, boolean hidden)`
`ContainerTypeDescription(String name, String instantiatorClass, String description)`
`ContainerTypeDescription(String name, String instantiatorClass, String description, boolean server, boolean hidden)`

### Method Summary

All Methods Instance Methods Concrete Methods
`boolean` `equals(Object other)`
`String` `getDescription()` Get the String description associated with this ContainerTypeDescription instance
`String[]` `getImportedConfigs(String[] exporterSupportedConfigs)`
`protected IContainerInstantiator` `getInstantiator()`
`String` `getName()` Get ContainerTypeDescription name
`Dictionary` `getPropertiesForImportedConfigs(String[] importedConfigs, Dictionary exportedProperties)`
`String[]` `getSupportedAdapterTypes()` Get array of supported adapters for this container type description.
`String[]` `getSupportedConfigs()`
`String[]` `getSupportedIntents()`
`Class[][]` `getSupportedParameterTypes()` Get array of parameter types for this ContainerTypeDescription.
`int` `hashCode()`
`boolean` `isHidden()`
`boolean` `isServer()`
`String` `toString()`
`protected void` `traceAndLogException(int code, String method, Throwable e)`

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

`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

### Field Detail

#### name

    protected String name

#### instantiatorClass

    protected String instantiatorClass

#### instantiator

    protected IContainerInstantiator instantiator

#### description

    protected String description

#### hashCode

    protected int hashCode

#### server

    protected boolean server

#### hidden

    protected boolean hidden

### Constructor Detail

#### ContainerTypeDescription

    public ContainerTypeDescription(String name,
                                    String instantiatorClass,
                                    String description)

#### ContainerTypeDescription

    public ContainerTypeDescription(String name,
                                    String instantiatorClass,
                                    String description,
                                    boolean server,
                                    boolean hidden)

#### ContainerTypeDescription

    public ContainerTypeDescription(String name,
                                    IContainerInstantiator instantiator)

Parameters:
  `name` - name
  `instantiator` - instantiator
Since:
  3.4

#### ContainerTypeDescription

    public ContainerTypeDescription(String name,
                                    IContainerInstantiator instantiator,
                                    String description)

#### ContainerTypeDescription

    public ContainerTypeDescription(String name,
                                    IContainerInstantiator inst,
                                    String desc,
                                    boolean server,
                                    boolean hidden)

### Method Detail

#### getName

    public String getName()

Get ContainerTypeDescription name

Returns:
  String name for the ContainerTypeDescription. Will not be null.

#### equals

    public boolean equals(Object other)

Overrides:
  `equals` in class `Object`

#### hashCode

    public int hashCode()

Overrides:
  `hashCode` in class `Object`

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`

#### getInstantiator

    protected IContainerInstantiator getInstantiator()
                                              throws ClassNotFoundException,
                                                     InstantiationException,
                                                     IllegalAccessException

Throws:
  `ClassNotFoundException`
  `InstantiationException`
  `IllegalAccessException`

#### getDescription

    public String getDescription()

Get the String description associated with this ContainerTypeDescription instance

Returns:
  String description. May be null.

#### isServer

    public boolean isServer()

#### isHidden

    public boolean isHidden()

#### getSupportedAdapterTypes

    public String[] getSupportedAdapterTypes()

Get array of supported adapters for this container type description. The returned array entries will be the fully qualified names of the adapter classes. Note that the returned types do not guarantee that a subsequent call to `IContainer.getAdapter(Class)` with the same type name as a returned value will return a non-`null` result. In other words, even if the class name is in the returned array, subsequent calls to `IContainer.getAdapter(Class)` may still return `null`.

Returns:
  String[] of supported adapters. The entries in the returned array will be the fully qualified class names of adapters supported by the given description. An empty string array (String[0]) will be returned if no adapters are supported.

#### traceAndLogException

    protected void traceAndLogException(int code,
                                        String method,
                                        Throwable e)

#### getSupportedParameterTypes

    public Class[][] getSupportedParameterTypes()

Get array of parameter types for this ContainerTypeDescription. Each of the rows of the returned array specifies a Class[] of parameter types. These parameter types correspond to the types of Objects that can be passed into the second parameter of `IContainerInstantiator.createInstance(ContainerTypeDescription, Object[])`. For example, if this method returns a Class [] = {{ String.class, String.class }, { String.class }} this indicates that a call to createInstance(description,new String[] { "hello", "there" }) and a call to createInstance(description,new String[] { "hello" }) will be understood by the underlying provider implementation.

Returns:
  Class[][] array of Class arrays. Each row corresponds to a Class[] that describes the types of Objects for second parameter to `IContainerInstantiator.createInstance(ContainerTypeDescription, Object[])`. If no parameter types are understood as arguments, a Class[0][0] array will be returned

#### getSupportedIntents

    public String[] getSupportedIntents()

Returns:
  String[] of container's intents.
Since:
  3.0

#### getSupportedConfigs

    public String[] getSupportedConfigs()

Returns:
  String[] supported configs
Since:
  3.1

#### getImportedConfigs

    public String[] getImportedConfigs(String[] exporterSupportedConfigs)

Parameters:
  `exporterSupportedConfigs` - exporter supported configs
Returns:
  String[] imported configs
Since:
  3.1

#### getPropertiesForImportedConfigs

    public Dictionary getPropertiesForImportedConfigs(String[] importedConfigs,
                                                      Dictionary exportedProperties)

Parameters:
  `importedConfigs` - imported configs
  `exportedProperties` - exported properties
Returns:
  Dictionary dictionary of properties for imported configs
Since:
  3.1