Class OperationContributorRegistry


public class OperationContributorRegistry extends Object
  • Constructor Details

    • OperationContributorRegistry

      public OperationContributorRegistry()
  • Method Details

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

    • getDefaultOperationContributors

      protected List<OperationContributor> getDefaultOperationContributors()
      The list of OperationContributors used to discover contributed operations by the registry. Subclasses may override this method to add, remove or change the order of the OperationContributors 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

      public Stream<OperationContributor> stream()