PROPOSAL: Method and Field Literals
Bruce Chapman
brucechapman at paradise.net.nz
Wed Mar 11 00:07:23 PDT 2009
Rémi Forax wrote:
> The major pain point of this proposal is, in my opinion, to have a concensus
> on the type of field#fieldame and type#methodName().
>
> The proposal uses java.lang.reflect.Field and java.lang.reflect.Method,
> I would prefer java.lang.reflect.Property and java.dyn.MethodHandle.
> (with java.lang.reflect.Property a pair of method handles (getter/setter)).
>
> Rémi
>
>
But if the runtime type of type#name was a Property consisting of 2
MethodHandles then it is no longer a field literal is it? There would
be no way to represent an actual field. And if you try to model a
property, is the compiler going to attempt to find a BeanInfo and
determine the getter setter method for the named property that way, or
just take some shortcuts? If it does ask the BeanInfo (as it should) how
will it do that if the BeanInfo exists only in source form (until the
current compilation completes)?
Bruce
More information about the coin-dev
mailing list