Package org.eclipse.e4.core.di.suppliers
Class ExtendedObjectSupplier
- java.lang.Object
-
- org.eclipse.e4.core.di.suppliers.ExtendedObjectSupplier
-
public abstract class ExtendedObjectSupplier extends Object
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 theIRequestor.resolveArguments(boolean)
andIRequestor.execute()
.- Since:
- 1.7
- See Also:
IRequestor.resolveArguments(boolean)
,IRequestor.execute()
-
-
Field Summary
Fields Modifier and Type Field Description static String
SERVICE_CONTEXT_KEY
An OSGi service property used to indicate the context key this function should be registered in.static String
SERVICE_NAME
The OSGi service name for an object provider service.
-
Constructor Summary
Constructors Constructor Description ExtendedObjectSupplier()
Constructs a new instance of an extended object supplier.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description 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.
-
-
-
Field Detail
-
SERVICE_NAME
public static final String 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
public static final String SERVICE_CONTEXT_KEY
An OSGi service property used to indicate the context key this function should be registered in.
-
-
Method Detail
-
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
-
-