Hi blackdrag, Private methods can be called - providing you have a lookup object that was constructed (via MethodHandles.lookup() ) in a context which can see the private method.
The point of the lookup mechanism is to provide the capability to selectively give access to private methods, without breaking the whole of access control or upsetting security managers. The use of lookup moves the access control check to method handle (or lookup) creation time, rather than method invocation time. Thanks, Ben On Tue, Jun 26, 2012 at 10:40 AM, Jochen Theodorou <blackd...@gmx.org> wrote: > Hi all, > > just to be sure I understand correctly... afaik there are two things > invokedynamic cannot do. > > (1) calling private methods > actually I am not sure this is really true. There is a Lookup instance I > can use to get handles to private methods (afaik), therefore it should > be possible. Or is there an artificial restriction of some kind? > > (2) calling super() > afaik I cannot generate a call site that replaces the invokeSpecial call > to a super class constructor. > > Am I right about those? > > bye blackdrag > > > -- > Jochen "blackdrag" Theodorou - Groovy Project Tech Lead > blog: http://blackdragsview.blogspot.com/ > german groovy discussion newsgroup: de.comp.lang.misc > For Groovy programming sources visit http://groovy-lang.org > > > _______________________________________________ > mlvm-dev mailing list > mlvm-dev@openjdk.java.net > http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev _______________________________________________ mlvm-dev mailing list mlvm-dev@openjdk.java.net http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev