Class OperationContributorRegistry
java.lang.Object
org.eclipse.epsilon.eol.execute.operations.contributors.OperationContributorRegistry
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(OperationContributor operationContributor) Adds the specifiedOperationContributor
to the list of contributors used to discover contributed operations by the registry.findContributedMethodForEvaluatedParameters
(Object target, String name, Object[] parameters, IEolContext context) Finds a contributed operation for the given target, name and parameters.findContributedMethodForUnevaluatedParameters
(Object target, String name, List<Expression> parameterExpressions, IEolContext context) Finds a contributed operation that is invoked without prior evaluation (i.e.protected List<OperationContributor>
The list ofOperationContributor
s used to discover contributed operations by the registry.protected Collection<OperationContributor>
getOperationContributorsFor
(Object target, IEolContext context) stream()
-
Constructor Details
-
OperationContributorRegistry
public OperationContributorRegistry()
-
-
Method Details
-
add
Adds the specified
OperationContributor
to the list of contributors used to discover contributed operations by the registry. Contributors added with this method have a lower precedence than the default operation contributors.To add an operation contributor with a higher precedence than one or more of the default operation contributors, define a subclass that overrides the
getDefaultOperationContributors()
method. -
getDefaultOperationContributors
The list ofOperationContributor
s used to discover contributed operations by the registry. Subclasses may override this method to add, remove or change the order of theOperationContributor
s used by the registry. -
findContributedMethodForUnevaluatedParameters
public ObjectMethod findContributedMethodForUnevaluatedParameters(Object target, String name, List<Expression> parameterExpressions, IEolContext context) Finds a contributed operation that is invoked without prior evaluation (i.e. the contributed operation evaluates its own AST). This category of contributed operation is rare, but can be used for rewriting parts of the AST at runtime or for selective logging or tracing. See, for example, EGL's contributor for OutputBuffer's print operations. -
findContributedMethodForEvaluatedParameters
public ObjectMethod findContributedMethodForEvaluatedParameters(Object target, String name, Object[] parameters, IEolContext context) Finds a contributed operation for the given target, name and parameters. This is the most common mechanism for contributing an operation. Operations contributed in this manner are invoked after their parameters have been evaluated. -
getOperationContributorsFor
protected Collection<OperationContributor> getOperationContributorsFor(Object target, IEolContext context) -
stream
- Returns:
- Since:
- 1.6
-