Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8263087

Add a MethodHandle combinator that switches over a set of MethodHandles

    XMLWordPrintable

    Details

      Description

      Add a MethodHandle combinator that takes a fixed set of MethodHandles, and returns a MethodHandle that can be used to switch over the set, given an index.

      A fallback MethodHandle can be provided as well for cases where the index is out of bounds.

      This is much like the tableswitch bytecode, but doesn't necessarily have to be implemented using that bytecode.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              jvernee Jorn Vernee
              Reporter:
              jvernee Jorn Vernee
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: