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
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 Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Clears the target and context.abstract boolean
contributesTo
(Object target) findContributedMethodForEvaluatedParameters
(Object target, String name, Object[] parameters, IEolContext context) findContributedMethodForEvaluatedParameters
(Object target, String name, Object[] parameters, IEolContext context, boolean overrideContextOperationContributorRegistry) findContributedMethodForUnevaluatedParameters
(Object target, String name, List<Expression> parameterExpressions, IEolContext context) protected IEolContext
protected Object
getReflectionTarget
(Object target) protected Object
protected boolean
Specifies whether methods in the supertype of the contributor should be included when finding contributed operations.void
setContext
(IEolContext context) void
-
Field Details
-
cachedMethodNames
-
-
Constructor Details
-
OperationContributor
public OperationContributor()
-
-
Method Details
-
contributesTo
-
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
-
getTarget
- Returns:
- The
target
field. - Since:
- 1.6
-
setTarget
-
setContext
-
getContext
- Returns:
- Since:
- 1.6
-
close
public void close()Clears the target and context.- Specified by:
close
in interfaceAutoCloseable
- Since:
- 2.2
-