[Edit]
+
0
-
0
java check if class implements interface
1 2 3 4 5 6Class<?> interfaceType = SomeInterface.class; Class<?> classType = SomeClass.class; if (interfaceType.isAssignableFrom(classType)) { // ... }
1 2 3 4 5 6Class<?> interfaceType = SomeInterface.class; Class<?> classType = SomeClass.class; if (interfaceType.isAssignableFrom(classType)) { // ... }