Hi there,
Ramiro is quite right.
Sorry for any confusion
caused by my misunderstanding.

Alan

Ramiro Gonzalez Maciel wrote:

> Hi all. Not an answer to the original posting, but a clarification that may help:
>
> >Any chance some the create parameter's are
> >primitive types (int, float, long etc...).
> >If so be aware that reflection converts all
> >primitive parameters to there Java class equivalents
> >(Integer, Float, Long).
>
> This is not correct, the reflection mechanism also works with primitive types. You 
>can get a method with primitive types using the primitive type.class, for example:
>
> to get a Method object for the method Customer.setCustomerNr(int ) you can execute
> Customer.class.getMethod("setCustomerNr", new
> java.lang.Class[] { int.class })
>
> This is the way RMI works, by the way.
>
> The conversion takes place when the method is invoked, since invoke takes as 
>parameters ( Object, Object[]) and returns an Object. From the invoke method comment:
>
> "Individual parameters are automatically unwrapped to match
> primitive formal parameters, and both primitive and reference
> parameters are subject to widening conversions as
> necessary. The value returned by the underlying method is
> automatically wrapped in an object if it has a primitive type.
> "
>
>              R

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to