jdk/src/java.base/share/classes/java/lang/invoke/LambdaMetafactory.java
changeset 45124 144479e89cdb
parent 45117 7470e726740b
child 46148 6d8e27cd2f1e
equal deleted inserted replaced
45123:e0a225dbc346 45124:144479e89cdb
     1 /*
     1 /*
     2  * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2012, 2017, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.  Oracle designates this
     7  * published by the Free Software Foundation.  Oracle designates this
   147  * <p>Further, at capture time, if {@code implMethod} corresponds to an instance
   147  * <p>Further, at capture time, if {@code implMethod} corresponds to an instance
   148  * method, and there are any capture arguments ({@code K > 0}), then the first
   148  * method, and there are any capture arguments ({@code K > 0}), then the first
   149  * capture argument (corresponding to the receiver) must be non-null.
   149  * capture argument (corresponding to the receiver) must be non-null.
   150  *
   150  *
   151  * <p>A type Q is considered adaptable to S as follows:
   151  * <p>A type Q is considered adaptable to S as follows:
   152  * <table summary="adaptable types">
   152  * <table class="borderless">
       
   153  *   <caption style="display:none">adaptable types</caption>
       
   154  *   <thead>
   153  *     <tr><th>Q</th><th>S</th><th>Link-time checks</th><th>Invocation-time checks</th></tr>
   155  *     <tr><th>Q</th><th>S</th><th>Link-time checks</th><th>Invocation-time checks</th></tr>
       
   156  *   </thead>
       
   157  *   <tbody>
   154  *     <tr>
   158  *     <tr>
   155  *         <td>Primitive</td><td>Primitive</td>
   159  *         <td>Primitive</td><td>Primitive</td>
   156  *         <td>Q can be converted to S via a primitive widening conversion</td>
   160  *         <td>Q can be converted to S via a primitive widening conversion</td>
   157  *         <td>None</td>
   161  *         <td>None</td>
   158  *     </tr>
   162  *     </tr>
   174  *         <td>Reference</td><td>Reference</td>
   178  *         <td>Reference</td><td>Reference</td>
   175  *         <td>for parameter types: S is a supertype of Q
   179  *         <td>for parameter types: S is a supertype of Q
   176  *         <br>for return types: none</td>
   180  *         <br>for return types: none</td>
   177  *         <td>Cast from Q to S</td>
   181  *         <td>Cast from Q to S</td>
   178  *     </tr>
   182  *     </tr>
       
   183  *   </tbody>
   179  * </table>
   184  * </table>
   180  *
   185  *
   181  * @apiNote These linkage methods are designed to support the evaluation
   186  * @apiNote These linkage methods are designed to support the evaluation
   182  * of <em>lambda expressions</em> and <em>method references</em> in the Java
   187  * of <em>lambda expressions</em> and <em>method references</em> in the Java
   183  * Language.  For every lambda expressions or method reference in the source code,
   188  * Language.  For every lambda expressions or method reference in the source code,