Lines Matching defs:test
2758 * by guarding it with a test, a boolean-valued method handle.
2762 * of the test must be boolean, and the test is allowed
2766 * boolean test(A...);
2770 * if (test(a...))
2776 * Note that the test arguments ({@code a...} in the pseudocode) cannot
2777 * be modified by execution of the test, and so are passed unchanged
2779 * @param test method handle used for test, must return boolean
2780 * @param target method handle to call if test passes
2781 * @param fallback method handle to call if test fails
2784 * @throws IllegalArgumentException if {@code test} does not return boolean,
2786 * type of {@code test} changed to match that of the target).
2789 MethodHandle guardWithTest(MethodHandle test,
2792 MethodType gtype = test.type();
2804 throw misMatchedTypes("target and test types", ttype, gtype);
2805 test = dropArguments(test, gpc, targs.subList(gpc, tpc));
2806 gtype = test.type();
2809 return new Transformers.GuardWithTest(test, target, fallback);