|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IComponentTypeIntrospector
Clients should provide an implementation which updates the individual
features on a ComponentType when introspect(int, List)
is called.
Implementations are encouraged to only reflect the specific field requested, and delay the introspection of the entire type, if possible.
The init(Implementation)
method will be called before the
introspector is used and after the introspector has been added to the
ComponentType
. Implementations are required
to save the implementation supplied when the init(Implementation)
method is called.
Implementations may subclass
AbstractComponentTypeIntrospector
for convenience.
Clients may implement this interface.
AbstractComponentTypeIntrospector
Field Summary | |
---|---|
static java.lang.String |
ADAPTER_TYPE
The ADAPTER_TYPE is used for searching for IComponentTypeIntrospectors attached to the eAdapter() list of an EObject. |
Method Summary | |
---|---|
IStatus |
dispose()
Release any resources that were required to introspect the implementation model. |
IStatus |
hasValidComponentType()
This method will only be called after init() and after the introspector has been added to the ComponentType as an adapter, so clients will also have access to a the ComponentType model object via AbstractComponentTypeIntrospector.getComponentType() if clients
choose to subclass that the AbstractComponentTypeIntrospector
type. |
void |
init(Implementation theImplementation)
init() will be called exactly once with the implementation model from a Component. |
IStatus |
introspect(int theFieldType,
java.util.List theCurrentValues)
The introspector should add or remove values as necessary to synchronize the current list available on the ComponentType with the underlying implementation model. |
IStatus |
onModelChange(int theFieldType,
int theChangeType,
java.lang.Object theChangedObject)
Respond to a change in the list of values for a given field type. |
java.lang.Object |
resolveImplementation()
|
IStatus |
save()
Persist the changes made to the underlying model through this adaptation. |
Field Detail |
---|
static final java.lang.String ADAPTER_TYPE
Method Detail |
---|
void init(Implementation theImplementation)
theImplementation
- An implementation URI that uses a scheme or extension which this
IComponentTypeIntrospector is interested in.IStatus hasValidComponentType()
AbstractComponentTypeIntrospector.getComponentType()
if clients
choose to subclass that the AbstractComponentTypeIntrospector
type.
IStatus introspect(int theFieldType, java.util.List theCurrentValues)
The integer value will indicate which field requires introspection. The values are available as:
SCAPackage.COMPONENT_TYPE__SERVICES
:
Indicates a list of Service
s.SCAPackage.COMPONENT_TYPE__REFERENCES
:
Indicates a list of Reference
s.SCAPackage.COMPONENT_TYPE__PROPERTIES
:
Indicates a list of Property
s.The current state of the list will be passed by reference. Clients may add and remove to this list and return it (without need for creating a new list). Clients should use the value of the theFieldType parameter to determine what type of values exist in the list. The possible types are described below.
theCurrentValues
- The current List of values known in the canonical model. The
list will be empty the first time this method is called.theFieldType
- The field that should be introspected. The types of fields are
available as SCAPackage.SERVICE
,
SCAPackage.COMPONENT_TYPE__REFERENCES
,
or
SCAPackage.COMPONENT_TYPE__PROPERTIES
.
Service
,
Reference
,
Property
IStatus onModelChange(int theFieldType, int theChangeType, java.lang.Object theChangedObject)
SCAPackage.SERVICE
,
SCAPackage.COMPONENT_TYPE__REFERENCES
,
or SCAPackage.COMPONENT_TYPE__PROPERTIES
.
theFieldType
- One of SCAPackage.SERVICE
,
SCAPackage.COMPONENT_TYPE__REFERENCES
,
or
SCAPackage.COMPONENT_TYPE__PROPERTIES
.
Indicates the type of changed object (SCAPackage.SERVICE
for Service
,
SCAPackage.COMPONENT_TYPE__REFERENCES
for Reference
, and
SCAPackage.COMPONENT_TYPE__PROPERTIES
for Property
).theChangeType
- One of org.eclipse.emf.common.notify.Notification#ADD
or
org.eclipse.emf.common.notify.Notification#REMOVE
.theChangedObject
- The object that was added or removed. Check the value of
theFieldType
to determine the type.
IStatus save()
IStatus dispose()
java.lang.Object resolveImplementation()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |