org.eclipse.stp.core.internal.introspection
Class ComponentTypeIntrospectorRegistry

java.lang.Object
  extended by org.eclipse.stp.core.internal.RegistryReader
      extended by org.eclipse.stp.core.internal.introspection.ComponentTypeIntrospectorRegistry

public class ComponentTypeIntrospectorRegistry
extends RegistryReader

This registry consumes the 'componentTypeIntrospector' extension point.

The introspectors are searched first by scheme and then by extension. If an introspector is registered for both the scheme and the extension, the scheme is given priority.

Clients should not require access to the registry (indeed it is not API). Clients should refer to IModelIntrospectionManager.

Since:
1.0

Constructor Summary
ComponentTypeIntrospectorRegistry()
          Create the registry for the STPCorePlugin.PLUGIN_ID and COMPONENT_TYPE_INTROSPECTOR extension point.
 
Method Summary
 IComponentTypeIntrospector createAndBindIntrospector(ComponentType aComponentType, org.eclipse.emf.common.util.URI implementation)
          Creates an IComponentTypeIntrospector for the implementation URI.
 IComponentTypeIntrospector createIntrospector(Implementation implementation)
          Creates an IComponentTypeIntrospector for the implementation URI.
static ComponentTypeIntrospectorRegistry getInstance()
           
 IShareableComponentTypeFactory getShareableFactory(Implementation implementation)
          This method assumes that the Implementation is contained so that it can check the FeatureMap of the containing model element.
 org.eclipse.emf.common.util.URI getShareableURI(Implementation anImplementation)
           
 boolean hasIntrospector(org.eclipse.emf.common.util.URI implementation)
           
 
Methods inherited from class org.eclipse.stp.core.internal.RegistryReader
getClassValue, getDescription, orderExtensions, readRegistry, readRegistry
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ComponentTypeIntrospectorRegistry

public ComponentTypeIntrospectorRegistry()
Create the registry for the STPCorePlugin.PLUGIN_ID and COMPONENT_TYPE_INTROSPECTOR extension point.

Method Detail

getInstance

public static ComponentTypeIntrospectorRegistry getInstance()
Returns:
An initialized singletone instance of the registry.

hasIntrospector

public boolean hasIntrospector(org.eclipse.emf.common.util.URI implementation)
Parameters:
implementation - The implementation URI that may have a registered introspector available.
Returns:
True if and only if the scheme or extension of the implementation URI has a registered introspector.

getShareableURI

public org.eclipse.emf.common.util.URI getShareableURI(Implementation anImplementation)

createAndBindIntrospector

public IComponentTypeIntrospector createAndBindIntrospector(ComponentType aComponentType,
                                                            org.eclipse.emf.common.util.URI implementation)
Creates an IComponentTypeIntrospector for the implementation URI. The introspectors are searched first by scheme and then by extension. If an introspector is registered for both the scheme and the extension, the scheme is given priority.

Parameters:
aComponentType - The ComponentType to add the bind (e.g. add the Introspector to).
implementation - The implementation URI of the relevant ComponentType
Returns:
A valid introspector for the implementation URI

createIntrospector

public IComponentTypeIntrospector createIntrospector(Implementation implementation)
Creates an IComponentTypeIntrospector for the implementation URI. The introspectors are searched first by scheme and then by extension. If an introspector is registered for both the scheme and the extension, the scheme is given priority.

Parameters:
implementation - The implementation URI of the relevant ComponentType
Returns:
A valid introspector for the implementation URI

getShareableFactory

public IShareableComponentTypeFactory getShareableFactory(Implementation implementation)
This method assumes that the Implementation is contained so that it can check the FeatureMap of the containing model element. Otherwise, the method checks for the FeatureAdapter on the Implementation. If neither of these attempts succeeds, then this method will fail miserably (e.g. return null).

Parameters:
implementation - The implementation which has a feature that can be used to search the registry.
Returns:
The correct IShareableComponentTypeFactory or null if none is specified.