org.eclipse.ecf.core
Class ContainerTypeDescription

java.lang.Object
  extended by org.eclipse.ecf.core.ContainerTypeDescription

public class ContainerTypeDescription
extends java.lang.Object

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

See Also:
IContainerInstantiator

Field Summary
protected  java.lang.String description
           
protected  int hashCode
           
protected  boolean hidden
           
protected  IContainerInstantiator instantiator
           
protected  java.lang.String instantiatorClass
           
protected  java.lang.String name
           
protected  boolean server
           
 
Constructor Summary
ContainerTypeDescription(java.lang.String name, IContainerInstantiator instantiator, java.lang.String description)
           
ContainerTypeDescription(java.lang.String name, IContainerInstantiator inst, java.lang.String desc, boolean server, boolean hidden)
           
ContainerTypeDescription(java.lang.String name, java.lang.String instantiatorClass, java.lang.String description)
           
ContainerTypeDescription(java.lang.String name, java.lang.String instantiatorClass, java.lang.String description, boolean server, boolean hidden)
           
 
Method Summary
 boolean equals(java.lang.Object other)
           
 java.lang.String getDescription()
          Get the String description associated with this ContainerTypeDescription instance
 java.lang.String[] getImportedConfigs(java.lang.String[] exporterSupportedConfigs)
           
protected  IContainerInstantiator getInstantiator()
           
 java.lang.String getName()
          Get ContainerTypeDescription name
 java.util.Dictionary getPropertiesForImportedConfigs(java.lang.String[] importedConfigs, java.util.Dictionary exportedProperties)
           
 java.lang.String[] getSupportedAdapterTypes()
          Get array of supported adapters for this container type description.
 java.lang.String[] getSupportedConfigs()
           
 java.lang.String[] getSupportedIntents()
           
 java.lang.Class[][] getSupportedParameterTypes()
          Get array of parameter types for this ContainerTypeDescription.
 int hashCode()
           
 boolean isHidden()
           
 boolean isServer()
           
 java.lang.String toString()
           
protected  void traceAndLogException(int code, java.lang.String method, java.lang.Throwable e)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

name

protected java.lang.String name

instantiatorClass

protected java.lang.String instantiatorClass

instantiator

protected IContainerInstantiator instantiator

description

protected java.lang.String description

hashCode

protected int hashCode

server

protected boolean server

hidden

protected boolean hidden
Constructor Detail

ContainerTypeDescription

public ContainerTypeDescription(java.lang.String name,
                                java.lang.String instantiatorClass,
                                java.lang.String description)

ContainerTypeDescription

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

ContainerTypeDescription

public ContainerTypeDescription(java.lang.String name,
                                IContainerInstantiator instantiator,
                                java.lang.String description)

ContainerTypeDescription

public ContainerTypeDescription(java.lang.String name,
                                IContainerInstantiator inst,
                                java.lang.String desc,
                                boolean server,
                                boolean hidden)
Method Detail

getName

public java.lang.String getName()
Get ContainerTypeDescription name

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

equals

public boolean equals(java.lang.Object other)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getInstantiator

protected IContainerInstantiator getInstantiator()
                                          throws java.lang.ClassNotFoundException,
                                                 java.lang.InstantiationException,
                                                 java.lang.IllegalAccessException
Throws:
java.lang.ClassNotFoundException
java.lang.InstantiationException
java.lang.IllegalAccessException

getDescription

public java.lang.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 java.lang.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-nullIContainer.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,
                                    java.lang.String method,
                                    java.lang.Throwable e)

getSupportedParameterTypes

public java.lang.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 java.lang.String[] getSupportedIntents()
Returns:
String[] of container's intents.
Since:
3.0

getSupportedConfigs

public java.lang.String[] getSupportedConfigs()
Since:
3.1

getImportedConfigs

public java.lang.String[] getImportedConfigs(java.lang.String[] exporterSupportedConfigs)
Since:
3.1

getPropertiesForImportedConfigs

public java.util.Dictionary getPropertiesForImportedConfigs(java.lang.String[] importedConfigs,
                                                            java.util.Dictionary exportedProperties)
Since:
3.1