jdk/src/java.base/share/classes/java/lang/invoke/LambdaMetafactory.java
changeset 46148 6d8e27cd2f1e
parent 45124 144479e89cdb
equal deleted inserted replaced
46147:047bdc4d771d 46148:6d8e27cd2f1e
   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 class="borderless">
   152  * <table class="striped">
   153  *   <caption style="display:none">adaptable types</caption>
   153  *   <caption style="display:none">adaptable types</caption>
   154  *   <thead>
   154  *   <thead>
   155  *     <tr><th>Q</th><th>S</th><th>Link-time checks</th><th>Invocation-time checks</th></tr>
   155  *     <tr><th scope="col">Q</th><th scope="col">S</th><th scope="col">Link-time checks</th><th scope="col">Invocation-time checks</th></tr>
   156  *   </thead>
   156  *   </thead>
   157  *   <tbody>
   157  *   <tbody>
   158  *     <tr>
   158  *     <tr>
   159  *         <td>Primitive</td><td>Primitive</td>
   159  *         <th scope="row">Primitive</th><th scope="row">Primitive</th>
   160  *         <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>
   161  *         <td>None</td>
   161  *         <td>None</td>
   162  *     </tr>
   162  *     </tr>
   163  *     <tr>
   163  *     <tr>
   164  *         <td>Primitive</td><td>Reference</td>
   164  *         <th scope="row">Primitive</th><th scope="row">Reference</th>
   165  *         <td>S is a supertype of the Wrapper(Q)</td>
   165  *         <td>S is a supertype of the Wrapper(Q)</td>
   166  *         <td>Cast from Wrapper(Q) to S</td>
   166  *         <td>Cast from Wrapper(Q) to S</td>
   167  *     </tr>
   167  *     </tr>
   168  *     <tr>
   168  *     <tr>
   169  *         <td>Reference</td><td>Primitive</td>
   169  *         <th scope="row">Reference</th><th scope="row">Primitive</th>
   170  *         <td>for parameter types: Q is a primitive wrapper and Primitive(Q)
   170  *         <td>for parameter types: Q is a primitive wrapper and Primitive(Q)
   171  *         can be widened to S
   171  *         can be widened to S
   172  *         <br>for return types: If Q is a primitive wrapper, check that
   172  *         <br>for return types: If Q is a primitive wrapper, check that
   173  *         Primitive(Q) can be widened to S</td>
   173  *         Primitive(Q) can be widened to S</td>
   174  *         <td>If Q is not a primitive wrapper, cast Q to the base Wrapper(S);
   174  *         <td>If Q is not a primitive wrapper, cast Q to the base Wrapper(S);
   175  *         for example Number for numeric types</td>
   175  *         for example Number for numeric types</td>
   176  *     </tr>
   176  *     </tr>
   177  *     <tr>
   177  *     <tr>
   178  *         <td>Reference</td><td>Reference</td>
   178  *         <th scope="row">Reference</th><th scope="row">Reference</th>
   179  *         <td>for parameter types: S is a supertype of Q
   179  *         <td>for parameter types: S is a supertype of Q
   180  *         <br>for return types: none</td>
   180  *         <br>for return types: none</td>
   181  *         <td>Cast from Q to S</td>
   181  *         <td>Cast from Q to S</td>
   182  *     </tr>
   182  *     </tr>
   183  *   </tbody>
   183  *   </tbody>