Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
Difference between revisions of "Java11/Examples"
m |
(Undo revision 431060 by Lshanmug.in.ibm.com (talk)) |
||
(3 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | |||
− | |||
This is an informal page listing examples of features that are implemented by the Java 11 Support. You are welcome to try out these examples. If you find bugs, please file a bug after checking for a duplicate entry [https://bugs.eclipse.org/bugs/buglist.cgi?cmdtype=dorem&remaction=run&namedcmd=J11.Open&sharer_id=152344 here]. | This is an informal page listing examples of features that are implemented by the Java 11 Support. You are welcome to try out these examples. If you find bugs, please file a bug after checking for a duplicate entry [https://bugs.eclipse.org/bugs/buglist.cgi?cmdtype=dorem&remaction=run&namedcmd=J11.Open&sharer_id=152344 here]. | ||
Line 111: | Line 109: | ||
public static void main(String[] args) { | public static void main(String[] args) { | ||
− | I lam = (var x) -> { | + | I lam = (var x) -> { // hover over var |
System.out.println(x); | System.out.println(x); | ||
}; | }; | ||
Line 132: | Line 130: | ||
! scope="row" | Basic Nesting Principles | ! scope="row" | Basic Nesting Principles | ||
| | | | ||
− | + | <b>Description: Nest Based Access - A JVM Concept.</b> | |
− | + | A top level class and all inner classes form a single unit for access, a "nest".JVM | |
− | + | specification added two attributes in the classfile NestHost and NestMember. The top | |
− | The top most class will have the NestMember attribute listing all the members while | + | most class will have the NestMember attribute listing all the members while each of |
− | each of the inner classes will have a NestHost attribute listing the top level class. | + | the inner classes will have a NestHost attribute listing the top level class. Using |
− | Using this, some of the synthetic bridge methods are elided transparent to the programmer. | + | this, some of the synthetic bridge methods are elided transparent to the programmer. |
− | Note that this feature is relevant only for tools that process byte code and hence, in general, | + | Note that this feature is relevant only for tools that process byte code and hence, |
− | this feature would be "transparent" to a "normal" programmer. This feature is applicable for byte | + | in general, this feature would be "transparent" to a "normal" programmer. This feature |
− | code processors, for eg our Disassembler has been enhanced to show these attributes. | + | is applicable for byte code processors, for eg our Disassembler has been enhanced to |
− | + | show these attributes. For further info please read JEP 181. | |
− | + | ||
<br> | <br> | ||
<source lang="java"> | <source lang="java"> |
Latest revision as of 02:43, 13 March 2019
This is an informal page listing examples of features that are implemented by the Java 11 Support. You are welcome to try out these examples. If you find bugs, please file a bug after checking for a duplicate entry here.