Originally posted by Jeanne Boyarsky:
Tal,
"int" is not a class; it is a primitive. This means it is built in and there isn't a class that defines it. There is a logical Object equivalent - Integer.
If you want this, you could write a method to see if the String contains a primitive and map to the appropriate value yourself. There aren't too many of these so you could list them out in the code (or better yet in a Map.) If the type you are looking for is not in the list, you could then proceed to use Class.forName.
as someone already said, although int is a primitive type, there's still a class representing it. try: int.class
an you'll get that class.
Peter - thanks for the Integer.TYPE soulution