public class DefaultOpMatchingService extends AbstractService implements OpMatchingService
Ops which match a request.| Constructor and Description |
|---|
DefaultOpMatchingService() |
| Modifier and Type | Method and Description |
|---|---|
Module |
assignInputs(Module module,
Object... args)
Assigns arguments into the given module's inputs.
|
List<OpCandidate> |
filterMatches(List<OpCandidate> candidates)
Filters a list of ops to those matching the given arguments.
|
List<OpCandidate> |
findCandidates(OpEnvironment ops,
List<OpRef> refs)
Builds a list of candidate ops which might match one of the given op
references.
|
List<OpCandidate> |
findCandidates(OpEnvironment ops,
OpRef ref)
Builds a list of candidate ops which might match the given op reference.
|
OpCandidate |
findMatch(OpEnvironment ops,
List<OpRef> refs)
Finds and initializes the best module matching any of the given op name
and/or type + arguments.
|
OpCandidate |
findMatch(OpEnvironment ops,
OpRef ref)
Finds and initializes the best module matching the given op name and/or
type + arguments.
|
Module |
match(OpCandidate candidate)
Attempts to match the given arguments to the
Op described by the
specified ModuleInfo. |
Object[] |
padArgs(OpCandidate candidate)
Checks the number of args, padding optional args with null as needed.
|
boolean |
typesMatch(OpCandidate candidate)
Checks that each parameter is type-compatible with its corresponding
argument.
|
getContext, setContext, toStringgetInfo, getPriority, setInfo, setPrioritycontextclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitinitialize, registerEventHandlersgetIdentifier, logcontext, getContext, setContextcompareTo, getPriority, setPrioritygetInfo, setInfogetLocationgetVersiondisposepublic OpCandidate findMatch(OpEnvironment ops, OpRef ref)
OpMatchingServiceOpCandidate containing the matching module
will be returned.findMatch in interface OpMatchingServiceops - The pool from which candidate ops should be drawn.ref - The op reference describing the op to match.OpCandidate containing the module which wraps the best
Op, with populated inputs, ready to run.public OpCandidate findMatch(OpEnvironment ops, List<OpRef> refs)
OpMatchingServiceOpCandidate containing the matching
module will be returned.findMatch in interface OpMatchingServiceops - The pool from which candidate ops should be drawn.refs - The op references describing the op to match.OpCandidate containing the module which wraps the best
Op, with populated inputs, ready to run.public List<OpCandidate> findCandidates(OpEnvironment ops, OpRef ref)
OpMatchingServicefindCandidates in interface OpMatchingServiceops - The pool from which candidate ops should be drawn.ref - The op reference describing the op to match.public List<OpCandidate> findCandidates(OpEnvironment ops, List<OpRef> refs)
OpMatchingServicefindCandidates in interface OpMatchingServiceops - The pool from which candidate ops should be drawn.refs - The op references describing the op to match.public List<OpCandidate> filterMatches(List<OpCandidate> candidates)
OpMatchingServicefilterMatches in interface OpMatchingServicecandidates - The list of op candidates to scan for matches.Module
instances attached.public Module match(OpCandidate candidate)
OpMatchingServiceOp described by the
specified ModuleInfo.match in interface OpMatchingServiceModule instance for the matching Op, or
null if the arguments do not match the Op.public boolean typesMatch(OpCandidate candidate)
OpMatchingServicetypesMatch in interface OpMatchingServicepublic Module assignInputs(Module module, Object... args)
OpMatchingServiceassignInputs in interface OpMatchingServicepublic Object[] padArgs(OpCandidate candidate)
OpMatchingServicepadArgs in interface OpMatchingServiceCopyright © 2014–2022 ImageJ. All rights reserved.