equal
deleted
inserted
replaced
69 * <ul> |
69 * <ul> |
70 * <li>Lookup methods which help create method handles for methods and fields. |
70 * <li>Lookup methods which help create method handles for methods and fields. |
71 * <li>Combinator methods, which combine or transform pre-existing method handles into new ones. |
71 * <li>Combinator methods, which combine or transform pre-existing method handles into new ones. |
72 * <li>Other factory methods to create method handles that emulate other common JVM operations or control flow patterns. |
72 * <li>Other factory methods to create method handles that emulate other common JVM operations or control flow patterns. |
73 * </ul> |
73 * </ul> |
|
74 * A lookup, combinator, or factory method will fail and throw an |
|
75 * {@code IllegalArgumentException} if the created method handle's type |
|
76 * would have <a href="MethodHandle.html#maxarity">too many parameters</a>. |
74 * |
77 * |
75 * @author John Rose, JSR 292 EG |
78 * @author John Rose, JSR 292 EG |
76 * @since 1.7 |
79 * @since 1.7 |
77 */ |
80 */ |
78 public class MethodHandles { |
81 public class MethodHandles { |
384 * on various grounds (<a href="MethodHandles.Lookup.html#secmgr">see below</a>). |
387 * on various grounds (<a href="MethodHandles.Lookup.html#secmgr">see below</a>). |
385 * By contrast, the {@code ldc} instruction on a {@code CONSTANT_MethodHandle} |
388 * By contrast, the {@code ldc} instruction on a {@code CONSTANT_MethodHandle} |
386 * constant is not subject to security manager checks. |
389 * constant is not subject to security manager checks. |
387 * <li>If the looked-up method has a |
390 * <li>If the looked-up method has a |
388 * <a href="MethodHandle.html#maxarity">very large arity</a>, |
391 * <a href="MethodHandle.html#maxarity">very large arity</a>, |
389 * the method handle creation may fail, due to the method handle |
392 * the method handle creation may fail with an |
390 * type having too many parameters. |
393 * {@code IllegalArgumentException}, due to the method handle type having |
|
394 * <a href="MethodHandle.html#maxarity">too many parameters.</a> |
391 * </ul> |
395 * </ul> |
392 * |
396 * |
393 * <h1><a id="access"></a>Access checking</h1> |
397 * <h1><a id="access"></a>Access checking</h1> |
394 * Access checks are applied in the factory methods of {@code Lookup}, |
398 * Access checks are applied in the factory methods of {@code Lookup}, |
395 * when a method handle is created. |
399 * when a method handle is created. |