Using Java reflection, Method.getReturnType() returns a Class. One of the methods I'm looking for (during reflection) returns a byte[]. What is the best way to test for this?
I discovered that testing for Method.getReturnType().getName().equals("[B") works, but is the best way to check the return type?
I have a similar problem but harder. I use java reflection to get back a Class. I need to check whether it is subclass of Collection, therefore I can't use equal to do the checking. I tried the isInstance(), but it doesn't seem to work.