Unboxed argument lists for method handles

The way in which unboxed argument lists are currently handled can lead to processing inefficiencies. This is especially true when we use Object[] or List<object> as variable-length argument lists. Java uses java.lang.invoke to transform the method calls using boxing. In Java, autoboxing is when the compiler automatically converts primitive types and their corresponding object wrapper classes. Here is the list of wrapper classes along with the corresponding primitive type:

Wrapper class Primitive type
Boolean boolean
Byte byte
Character char
Double double
Float float
Integer int
Long long
Short short

 

As you can see from the following illustration autoboxing occurs when we go ...

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.