Skip to content

Commit 3fcacbb

Browse files
Treiblesschorlegselzer
authored andcommitted
Add api to find ops specifying the op name
1 parent a1253b2 commit 3fcacbb

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

‎src/main/java/org/scijava/ops/OpService.java‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,16 @@ public <T, E extends OpIdentifier> T findOp(final OpIdentifier op, final Nil<T>
169169
return findOpInstance(op.getName(), specialType, inTypes, new Nil[] { outType }, secondaryArgs).object();
170170
}
171171

172+
public <T> T findOp(final String opName, final Nil<T> specialType, final Nil<?>[] inTypes, final Nil<?>[] outTypes,
173+
final Object... secondaryArgs) {
174+
return findOpInstance(opName, specialType, inTypes, outTypes, secondaryArgs).object();
175+
}
176+
177+
public <T, E extends OpIdentifier> T findOp(final String opName, final Nil<T> specialType, final Nil<?>[] inTypes,
178+
final Nil<?> outType, final Object... secondaryArgs) {
179+
return findOpInstance(opName, specialType, inTypes, new Nil[] { outType }, secondaryArgs).object();
180+
}
181+
172182
public MatchingResult findTypeMatches(final OpRef ref) {
173183
return matcher.findMatch(this, ref);
174184
}

0 commit comments

Comments
 (0)