0 Replies Latest reply: Nov 8, 2012 4:48 PM by Aacc RSS

    Java 7: InvokeDynamic question

    Aacc
      InvokeDynamic introduced in Java 7.
      I have a question regarding the example shows here:
      http://docs.oracle.com/javase/7/docs/technotes/guides/vm/multiple-language-support.html#challenges

      My understanding is that the bootstrap method mybsm links the strong typed method: IntegerOps.adder(Integer x, Integer y) to a non-java language based dynamically typed method : +
      here, the + is a method in the non-java language.

      Is my understanding correct?

      If so, I thought I should see both the adder and + methods appears in bootstrap method mybsm (so that they are linked). but I don't see "+" method at all.

      I'm sure I haven't fully understand something about InvokeDynamic, could someone clarify ?

      Thanks