org.eclipse.stp.core.introspection
Interface IModelIntrospectionManager


public interface IModelIntrospectionManager

Provides a hook into the introspection framework to bind ComponentTypes to the introspector that understands the underlying model.

The methods declared on this interface do not throw checked exceptions (although Runtime exceptions such as AssertionFailedException could be thrown), but instead will set the status of the given SCAObject if a problem occurs. Clients may check for problems using SCAObject.getStatus().

This interface is not intended to be implemented by clients.

Since:
1.0

Field Summary
static IModelIntrospectionManager eINSTANCE
          The singleton instance for the introspection manager.
 
Method Summary
 void bind(ComponentType componentType, URI implementation)
          Bind a ComponentType to a specific implementation.
 ComponentType resolve(Implementation implementation)
          Resolve will return a ComponentType bound to the given implementation.
 void unbind(ComponentType componentType)
          Strip the modeled ComponentType from the implementation which backs it.
 

Field Detail

eINSTANCE

static final IModelIntrospectionManager eINSTANCE
The singleton instance for the introspection manager.

Method Detail

bind

void bind(ComponentType componentType,
          URI implementation)
Bind a ComponentType to a specific implementation. In general, clients will not need to call this method.

Clients which acquire the ComponentType from Component.resolveComponentType() should NOT call this method.

Parameters:
componentType - A non-null componentType
implementation - The implementation URI of the backing model (e.g. a fully qualified Java class)

unbind

void unbind(ComponentType componentType)
Strip the modeled ComponentType from the implementation which backs it. The ComponentType will have no properties, services, or references after this method.

No changes will be made to the underlying model as a result of this method.

Parameters:
componentType - A non-null componenttype that has been bound.

resolve

ComponentType resolve(Implementation implementation)
Resolve will return a ComponentType bound to the given implementation.

The ComponentType can be shared in some cases. If the implementation introspector defines an IShareableComponentTypeFactory, then the implementation model will be converted to URI and requested through the ResourceSet of the Implementation that is supplied.

Therefore, resolve() should only be supplied implementations that are contained by a Component, which are contained by a ResourceSet. (The actual containment is Implementation > Component > Composite/Module > SCACoreRoot > Resource > ResourceSet).

The one special case is AbstractImplementation (SCAPackage.getAbstractImplementation()) which does not need to be contained to be resolved.

The feature from the implementation will be determined using the FeatureMap of the containing Component.

Parameters:
implementation - A contained Implementation
Returns:
The (possibly shared) bound ComponentType derived from the given Implementation.