mardi 10 janvier 2017

How to judge boolean equals to Boolean or long equals to Long in java?

I hava two methods, one is boolean getA(), another one is void setA(Boolean a).
I need judge the get method return type is equal to set method param type to do something.

// set method param type
Class<?> paramType = m2.getParameterTypes()[0];
// get method return type
Class<?> returnType = m1.getReturnType();

How can I judge these two type equal?





Aucun commentaire:

Enregistrer un commentaire