C
cyberco
How can I test whether an Object implements a certain Interface that is
provided as Interface.class? I've tried the following:
====================================
boolean test(Object interfaceObj, Object testObj) {
//return true if testObj implements interfaceObj
}
test(MyInterface.class, someObj);
====================================
I think I've tried all variations of instance of and getClass() but
somehow I can't find the solution. The problem is with the fact that
I'm using MyInterface.class instead of an object.
Any suggestions?
Cheers,
cyberco
provided as Interface.class? I've tried the following:
====================================
boolean test(Object interfaceObj, Object testObj) {
//return true if testObj implements interfaceObj
}
test(MyInterface.class, someObj);
====================================
I think I've tried all variations of instance of and getClass() but
somehow I can't find the solution. The problem is with the fact that
I'm using MyInterface.class instead of an object.
Any suggestions?
Cheers,
cyberco