Reflection
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Anonymous
Posted On:   Tuesday, May 1, 2001 01:16 PM

Is there a way to use reflection using primitive data types???? That is, can I pass primitive data types as arguments while using Reflection? If not, is there a way around this?

Thx.

Re: Reflection

Posted By:   Michael_Wax  
Posted On:   Tuesday, May 1, 2001 07:55 PM

Yes. The method
java.lang.reflect.Method.getParameterTypes()

returns an array of Class objects which includes objects representing types such as int and double. The
java.lang.reflect.Method.invoke(Object,Object[])
similarly allows for the use of primitive types.
About | Sitemap | Contact