上QQ阅读APP看书,第一时间看更新
Proof of concept
Nashorn is a lightweight, high-performance, JavaScript runtime that permits embedding JavaScript in Java applications. This was created for Java 8 and replaced the previous JavaScript scripting engine that was based on Mozilla Rhino. Nashorn already has this functionality. It provides linkage between high-level operations on any object of unknown types, such as obj.something, where it produces the following:
INVOKEDYNAMIC "dyn.getProp.something"
The dynamic linker springs into action and provides, when possible, the appropriate implementation.