Package org.eclipse.ecf.core
Class ContainerTypeDescription
java.lang.Object
org.eclipse.ecf.core.ContainerTypeDescription
Description of an
IContainer
type. Instances of this class are used to represent IContainerInstantiator
s
in the ContainerFactory
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionprotected String
protected int
protected boolean
protected IContainerInstantiator
protected String
protected String
protected boolean
-
Constructor Summary
ConstructorDescriptionContainerTypeDescription
(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
Modifier and TypeMethodDescriptionboolean
Get the String description associated with this ContainerTypeDescription instanceString[]
getImportedConfigs
(String[] exporterSupportedConfigs) protected IContainerInstantiator
getName()
Get ContainerTypeDescription namegetPropertiesForImportedConfigs
(String[] importedConfigs, Dictionary exportedProperties) String[]
Get array of supported adapters for this container type description.String[]
String[]
Class[][]
Get array of parameter types for this ContainerTypeDescription.int
hashCode()
boolean
isHidden()
boolean
isServer()
toString()
protected void
traceAndLogException
(int code, String method, Throwable e)
-
Field Details
-
name
-
instantiatorClass
-
instantiator
-
description
-
hashCode
protected int hashCode -
server
protected boolean server
-
-
Constructor Details
-
ContainerTypeDescription
-
ContainerTypeDescription
-
ContainerTypeDescription
- 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 Details
-
getName
Get ContainerTypeDescription name- Returns:
- String name for the ContainerTypeDescription. Will not be null.
-
equals
-
hashCode
public int hashCode() -
toString
-
getInstantiator
protected IContainerInstantiator getInstantiator() throws ClassNotFoundException, InstantiationException, IllegalAccessException -
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
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.
-
traceAndLogException
-
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
- Returns:
- String[] of container's intents.
- Since:
- 3.0
-
getSupportedConfigs
- Returns:
- String[] supported configs
- Since:
- 3.1
-
getImportedConfigs
- 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
-