Package org.eclipse.e4.core.contexts
Class ContextFunction
- java.lang.Object
-
- org.eclipse.e4.core.contexts.ContextFunction
-
- All Implemented Interfaces:
IContextFunction
public abstract class ContextFunction extends Object implements IContextFunction
The base class for all computed value implementations. Clients may subclass this class. See the class comment ofIContextFunctionfor specific rules that must be followed by function implementations.This class is intended to be subclassed by clients.
- Since:
- 1.3
- See Also:
IContextFunction
-
-
Field Summary
-
Fields inherited from interface org.eclipse.e4.core.contexts.IContextFunction
SERVICE_CONTEXT_KEY, SERVICE_NAME
-
-
Constructor Summary
Constructors Constructor Description ContextFunction()Constructs a new instance of the context function
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description Objectcompute(IEclipseContext context)Deprecated.IContextFunction's compute() was changed to take the context keyObjectcompute(IEclipseContext context, String contextKey)Evaluates the function based on the provided arguments and context to produce a consistent result.
-
-
-
Method Detail
-
compute
@Deprecated public Object compute(IEclipseContext context)
Deprecated.IContextFunction's compute() was changed to take the context key
-
compute
public Object compute(IEclipseContext context, String contextKey)
Description copied from interface:IContextFunctionEvaluates the function based on the provided arguments and context to produce a consistent result.- Specified by:
computein interfaceIContextFunction- Parameters:
context- The context in which to perform the value computation.contextKey- The context key used to find this function; may benullsuch as if invoked directly.- Returns:
- The concrete value. Implementations may return
IInjector.NOT_A_VALUEto cause lookup to continue up the context hierarchy.
-
-