Non static bootstrap method

John Rose john.r.rose at oracle.com
Mon Feb 21 18:18:55 PST 2011


This is worth a clarification:  The only meaningful bootstrap methods will be static methods and constructors for subclasses of CallSite.  I will add a note to the effect into the javadoc.

Using a virtual method of class C as a BSM means that you expect the first stacked argument to the BSM to be the receiver, of type C.  Unless you were to choose a virtual on MethodHandles.Lookup that will serve your purpose (and there is nothing that will return a CallSite), there's no way that any of the stacked arguments will act as the method's receiver.

-- John



More information about the mlvm-dev mailing list