Hi,

I am facing a problem with the JType class, I want to determine if the
return type of a method is an instance of the String class.

This is my solution:

JMethod method = ...;
JType returnType = method.getReturnType();
if (returnType instanceof JClassType) {
     JClassType type = (JClassType) returnType;
     String name = type.getName();
     if (name.equals(String.class.getName())) {
              // ....
     }
}

Is there an efficient way to determine if the return type of method is
an instance of given class?

Thanks.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to