Package org.eclipse.e4.core.di.suppliers
Class ExtendedObjectSupplier
java.lang.Object
org.eclipse.e4.core.di.suppliers.ExtendedObjectSupplier
The base class for an "object supplier" - something that knows how to
instantiate objects corresponding to the object descriptor. Extended object
suppliers work as a part of an injector, filling in values that primary
suppliers don't know about.
If the supplier is asked to track changes, it should notify requestor
whenever any of the objects produced by the
get(IObjectDescriptor, IRequestor, boolean, boolean)
method change.
The supplier can do this by performing calls to the
IRequestor.resolveArguments(boolean)
and
IRequestor.execute()
.
- Since:
- 1.7
- See Also:
-
Field Summary
-
Constructor Summary
ConstructorDescriptionConstructs a new instance of an extended object supplier. -
Method Summary
Modifier and TypeMethodDescriptionabstract Object
get
(IObjectDescriptor descriptor, IRequestor requestor, boolean track, boolean group) This method is called by the dependency injection mechanism to obtain an object corresponding to the object descriptor.
-
Field Details
-
SERVICE_NAME
The OSGi service name for an object provider service. This name can be used to obtain instances of the service. -
SERVICE_CONTEXT_KEY
An OSGi service property used to indicate the context key this function should be registered in.
-
-
Constructor Details
-
ExtendedObjectSupplier
public ExtendedObjectSupplier()Constructs a new instance of an extended object supplier.
-
-
Method Details
-
get
public abstract Object get(IObjectDescriptor descriptor, IRequestor requestor, boolean track, boolean group) This method is called by the dependency injection mechanism to obtain an object corresponding to the object descriptor. If the supplier is asked to track changes, it should notify requestor whenever it detects a change that would result in a different result produced by this method.- Parameters:
descriptor
- descriptor of the object requested by the requestorrequestor
- the originator of this requesttrack
-true
if the object suppliers should notify requestor of changes to the returned objects;false
otherwisegroup
-true
if the change notifications can be grouped;false
otherwise- Returns:
- object corresponding to the object descriptor
-