Class OperationContributorRegistry

  • public class OperationContributorRegistry
    extends Object
    • Constructor Detail

      • OperationContributorRegistry

        public OperationContributorRegistry()
    • Method Detail

      • add

        public void add​(OperationContributor operationContributor)

        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.

      • 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.