Additional combinations

The following addition combinations have been added to support the ease of use and optimizations for the MethodHandle, MethodHandles, and MethodHandles.Lookup classes of the java.lang.invoke package in the Java 9 platform:

  • Generic loop abstraction:
    • MethodHandle loop(MethodHandle[] . . . clauses)
  • While loops:
    • MethodHandle whileLoop(MethodHandle init, MethodHandle pred, MethodHandle body)
  • Do...while loops:
    • MethodHandle doWhileLoop(MethodHandle init, MethodHandle body, MethodHandle pred)
  • Counting loops:
    • MethodHandle countedLoop(MethodHandle iterations, MethodHandle init, MethodHandle body)
  • Data structure iteration:
    • MethodHandle iteratedLoop(MethodHandle iterator, MethodHandle init, MethodHandle body)

Get Java 9: Building Robust Modular Applications now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.