Class OperationContributor

java.lang.Object
org.eclipse.epsilon.eol.execute.operations.contributors.OperationContributor
All Implemented Interfaces:
AutoCloseable
Direct Known Subclasses:
AnyOperationContributor, ArrayOperationContributor, BasicEUnitOperationContributor, BooleanOperationContributor, DateOperationContributor, DictionaryModelOperationContributor, EmgOperationContributor, EUnitTask.RunTargetOperationContributor, ExtraEUnitOperationContributor, IntegerOperationContributor, IterableOperationContributor, MixedElementOperationContributor, ModelElementOperationContributor, ModelOperationContributor, NumberOperationContributor, PictoOperationContributor, PlainXMLOperationContributor, ReflectiveOperationContributor, RequirementModelOperationContributor, ScalarOperationContributor, StringCompatibilityOperationContributor, StringOperationContributor, WrapperOperationContributor, YamlModelOperationContributor

public abstract class OperationContributor extends Object implements AutoCloseable
Implementation note: All extending classes should ensure that the operation contributor is stateless, or if it contains state (i.e. fields) then they are either immutable or ThreadLocal.
  • Field Details

    • cachedMethodNames

      protected Set<String> cachedMethodNames
  • Constructor Details

    • OperationContributor

      public OperationContributor()
  • Method Details

    • contributesTo

      public abstract boolean contributesTo(Object target)
    • findContributedMethodForUnevaluatedParameters

      public ObjectMethod findContributedMethodForUnevaluatedParameters(Object target, String name, List<Expression> parameterExpressions, IEolContext context)
    • findContributedMethodForEvaluatedParameters

      public ObjectMethod findContributedMethodForEvaluatedParameters(Object target, String name, Object[] parameters, IEolContext context)
    • findContributedMethodForEvaluatedParameters

      public ObjectMethod findContributedMethodForEvaluatedParameters(Object target, String name, Object[] parameters, IEolContext context, boolean overrideContextOperationContributorRegistry)
    • includeInheritedMethods

      protected boolean includeInheritedMethods()
      Specifies whether methods in the supertype of the contributor should be included when finding contributed operations. Typically, this should not be the case and, as such, this method returns false by default.
    • getReflectionTarget

      protected Object getReflectionTarget(Object target)
    • getTarget

      protected Object getTarget()
      Returns:
      The target field.
      Since:
      1.6
    • setTarget

      public void setTarget(Object target)
    • setContext

      public void setContext(IEolContext context)
    • getContext

      protected IEolContext getContext()
      Returns:
      Since:
      1.6
    • close

      public void close()
      Clears the target and context.
      Specified by:
      close in interface AutoCloseable
      Since:
      2.2