Module org.scijava.ops.engine
Class AdaptationMatchingRoutine
- java.lang.Object
-
- org.scijava.ops.engine.matcher.adapt.AdaptationMatchingRoutine
-
- All Implemented Interfaces:
Comparable<MatchingRoutine>,MatchingRoutine
public class AdaptationMatchingRoutine extends Object implements MatchingRoutine
-
-
Constructor Summary
Constructors Constructor Description AdaptationMatchingRoutine()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcheckSuitability(MatchingConditions conditions)OpCandidatefindMatch(MatchingConditions conditions, OpMatcher matcher, OpEnvironment env)Adapts an Op with the name of ref into a type that can be SAFELY cast to ref.doublepriority()The priority of thisMatchingRoutine-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.scijava.ops.engine.matcher.MatchingRoutine
compareTo, match
-
-
-
-
Method Detail
-
checkSuitability
public void checkSuitability(MatchingConditions conditions) throws OpMatchingException
- Specified by:
checkSuitabilityin interfaceMatchingRoutine- Throws:
OpMatchingException
-
findMatch
public OpCandidate findMatch(MatchingConditions conditions, OpMatcher matcher, OpEnvironment env) throws OpMatchingException
Adapts an Op with the name of ref into a type that can be SAFELY cast to ref.NB This method cannot use the
OpMatcherto find a suitableadaptOp. The premise of adaptation depends on the ability to examine the applicability of alladaptOps with the correct output type. We need to check all of them because we do not know whether:- The dependencies will exist for a particular
adaptOp - The Op we want exists with the correct type for the input of the
adaptOp.
- Specified by:
findMatchin interfaceMatchingRoutine- Parameters:
conditions- theMatchingConditionsthe return must satisfymatcher- theOpMatcherperforming the matchingenv- theOpEnvironmentcontaining matchable Ops- Returns:
- an
OpCandidatedescribing the match - Throws:
OpMatchingException- when no match can be found
- The dependencies will exist for a particular
-
priority
public double priority()
Description copied from interface:MatchingRoutineThe priority of thisMatchingRoutine- Specified by:
priorityin interfaceMatchingRoutine- Returns:
- the priority
-
-