|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.stp.core.introspection.AbstractComponentTypeIntrospector
public abstract class AbstractComponentTypeIntrospector
This class provides a default implementation of
IComponentTypeIntrospector
.
A template pattern is used for the the init(Implementation)
(doInit()
)
and notifyChanged(Notification)
(doNotifyChanged(Notification)
)
methods.
Clients may extend this class.
Field Summary |
---|
Fields inherited from interface org.eclipse.stp.core.introspection.IComponentTypeIntrospector |
---|
ADAPTER_TYPE |
Constructor Summary | |
---|---|
AbstractComponentTypeIntrospector()
Default constructor. |
Method Summary | |
---|---|
ComponentType |
getComponentType()
The componentType that this adapter is attached to is stored through a call to setTarget() when the adapter is added. |
Implementation |
getImplementation()
An implementation will not be returned if the init(Implementation) was supplied an
UnknownImplementation . |
URI |
getImplementationURI()
The implementation URI identifies where the real model is stored. |
Notifier |
getTarget()
Return the current target. |
void |
init(Implementation theImplementation)
The init method is called before any introspectXXX() methods are called. |
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. |
boolean |
isAdapterForType(java.lang.Object type)
Not to be called by clients |
void |
notifyChanged(Notification notification)
Notified when fields change on the ComponentType. |
void |
setTarget(Notifier newTarget)
Called when this adapter is added to a list of adapters. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.eclipse.stp.core.introspection.IComponentTypeIntrospector |
---|
dispose, hasValidComponentType, onModelChange, resolveImplementation, save |
Constructor Detail |
---|
public AbstractComponentTypeIntrospector()
Method Detail |
---|
public final void init(Implementation theImplementation)
init
in interface IComponentTypeIntrospector
theImplementation
- Either the URI the URI of the implementation (getImplementationURI()
)
or the actual Implementation model for this Introspector (getImplementation()
)
will be available after this method complete (but not both).public final void notifyChanged(Notification notification)
public final IStatus introspect(int theFieldType, java.util.List theCurrentValues)
IComponentTypeIntrospector
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.
introspect
in interface IComponentTypeIntrospector
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
.theCurrentValues
- The current List of values known in the canonical model. The
list will be empty the first time this method is called.
Service
,
Reference
,
Property
public final Notifier getTarget()
getComponentType()
directly.
public final ComponentType getComponentType()
public final URI getImplementationURI()
IShareableComponentTypeFactory
defined by the Introspector
extension, if any.
public final Implementation getImplementation()
init(Implementation)
was supplied an
UnknownImplementation
. The UnknownImplementation will
automatically be processed and the URI will be available from
getImplementationURI()
.
init(Implementation)
public final void setTarget(Notifier newTarget)
public final boolean isAdapterForType(java.lang.Object type)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |