Package org.eclipse.e4.core.di.suppliers
Class PrimaryObjectSupplier
java.lang.Object
org.eclipse.e4.core.di.suppliers.PrimaryObjectSupplier
The base class for an "object supplier" - something that knows how to
instantiate objects corresponding to the object descriptor.
If supplier is asked to track changes, it should notify requestor whenever
any of the objects produced by the
get(IObjectDescriptor[], Object[], IRequestor, boolean, 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:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract void
get
(IObjectDescriptor[] descriptors, Object[] actualValues, IRequestor requestor, boolean initial, boolean track, boolean group) This method is called by the dependency injection mechanism to obtain objects corresponding to the object descriptors.makeReference
(Object object) Creates a new reference to the object.abstract void
Pause tracking access to the supplier's objects.abstract void
Resume tracking access to the supplier's objects.
-
Constructor Details
-
PrimaryObjectSupplier
public PrimaryObjectSupplier()Default constructor
-
-
Method Details
-
get
public abstract void get(IObjectDescriptor[] descriptors, Object[] actualValues, IRequestor requestor, boolean initial, boolean track, boolean group) This method is called by the dependency injection mechanism to obtain objects corresponding to the object descriptors. 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:
descriptors
- descriptors to the objects requested by the requestoractualValues
- the values of actual arguments computed so far for the descriptors (in/out)requestor
- the requestor originating this requestinitial
-true
true if this is the initial request from the requestortrack
-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
-
pauseRecording
public abstract void pauseRecording()Pause tracking access to the supplier's objects. -
resumeRecording
public abstract void resumeRecording()Resume tracking access to the supplier's objects. -
makeReference
Creates a new reference to the object.Suppliers may override to provide improved memory management, for instance, by to tracking references with reference queues.
- Parameters:
object
- the referred object- Returns:
- a new weak reference to the object
-