Package org.eclipse.ecf.core
Class ContainerTypeDescription
- java.lang.Object
-
- org.eclipse.ecf.core.ContainerTypeDescription
-
public class ContainerTypeDescription extends Object
Description of anIContainer
type. Instances of this class are used to representIContainerInstantiator
s in theContainerFactory
- See Also:
IContainerInstantiator
-
-
Field Summary
Fields Modifier and Type Field Description 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 Description ContainerTypeDescription(String name, String instantiatorClass, String description)
ContainerTypeDescription(String name, String instantiatorClass, String description, boolean server, boolean hidden)
ContainerTypeDescription(String name, IContainerInstantiator instantiator)
ContainerTypeDescription(String name, IContainerInstantiator instantiator, String description)
ContainerTypeDescription(String name, IContainerInstantiator inst, String desc, boolean server, boolean hidden)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object other)
String
getDescription()
Get the String description associated with this ContainerTypeDescription instanceString[]
getImportedConfigs(String[] exporterSupportedConfigs)
protected IContainerInstantiator
getInstantiator()
String
getName()
Get ContainerTypeDescription nameDictionary
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)
-
-
-
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
- nameinstantiator
- 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.
-
getInstantiator
protected IContainerInstantiator getInstantiator() 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 toIContainer.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 toIContainer.getAdapter(Class)
may still returnnull
.- 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.
-
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 ofIContainerInstantiator.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 configsexportedProperties
- exported properties- Returns:
- Dictionary dictionary of properties for imported configs
- Since:
- 3.1
-
-