Skip to content

Commit 3a39fb6

Browse files
Treiblesschorlectrueden
authored andcommitted
Generalize to type
1 parent 1a71ed9 commit 3a39fb6

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/main/java/org/scijava/ops/matcher/OpRef.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,16 +136,16 @@ public String getLabel() {
136136
* Determines whether the specified type satisfies the op's required types
137137
* using {@link Types#isApplicable(Type[], Type[])}.
138138
*/
139-
public boolean typesMatch(final Class<?> opClass) {
139+
public boolean typesMatch(final Type opType) {
140140
if (types == null)
141141
return true;
142142
for (Type t : types) {
143143
if(t instanceof ParameterizedType) {
144-
if (!MatchingUtils.checkGenericAssignability(opClass, (ParameterizedType) t)) {
144+
if (!MatchingUtils.checkGenericAssignability(Types.raw(opType), (ParameterizedType) t)) {
145145
return false;
146146
}
147147
} else {
148-
if (!Types.isAssignable(opClass, t)) {
148+
if (!Types.isAssignable(opType, t)) {
149149
return false;
150150
}
151151
}

0 commit comments

Comments
 (0)