Jonathan Locke <jonathan.locke <at> gmail.com> writes:
> this suggestion (which is implementable in a user coderegardless of what goes
into the core) add(new ReflectionLink("myLink", "myMethod"))makes me wonder if
Java couldn't use a reflection notation
> similar to "object.class" to specify Method objects, like "myMethod.method".
then you could do this both conveniently and safely like this: add(new
MethodLink("myLink", myMethod.method
> ))or even just add(new MethodLink(myMethod.method))which would assume the link
is named myMethod...too bad "method" isn't a reserved keyword.
>
That's funny i came to the same conclusions : why java has MyClass.class and not
MyMethod.method... anyway there must be some good reason to this :)
Make me thing of php5 who can do that sort of thing :
$className = "myClass";
$anInstance = new $className();
$anInstance->doSomething();
Of course you loose all compile time check, IDE completion ... of Java
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user