1 /* |
1 /* |
2 * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2012, 2013, 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 |
218 * |
218 * |
219 * @param caller Stacked automatically by VM; represents a lookup context with the accessibility privileges |
219 * @param caller Stacked automatically by VM; represents a lookup context with the accessibility privileges |
220 * of the caller. |
220 * of the caller. |
221 * @param invokedName Stacked automatically by VM; the name of the invoked method as it appears at the call site. |
221 * @param invokedName Stacked automatically by VM; the name of the invoked method as it appears at the call site. |
222 * Currently unused. |
222 * Currently unused. |
223 * @param invokedType Stacked automatically by VM; the signature of the invoked method, which includes the |
223 * @param invokedType Stacked automatically by VM; the signature of the invoked method, which includes thefu |
224 * expected static type of the returned lambda object, and the static types of the captured |
224 * expected static type of the returned lambda object, and the static types of the captured |
225 * arguments for the lambda. In the event that the implementation method is an instance method, |
225 * arguments for the lambda. In the event that the implementation method is an instance method, |
226 * the first argument in the invocation signature will correspond to the receiver. |
226 * the first argument in the invocation signature will correspond to the receiver. |
227 * @param samMethod The primary method in the functional interface to which the lambda or method reference is |
227 * @param args argument to pass, flags, marker interface count, and marker interfaces as described above |
228 * being converted, represented as a method handle. |
|
229 * @param implMethod The implementation method which should be called (with suitable adaptation of argument |
|
230 * types, return types, and adjustment for captured arguments) when methods of the resulting |
|
231 * functional interface instance are invoked. |
|
232 * @param instantiatedMethodType The signature of the primary functional interface method after type variables |
|
233 * are substituted with their instantiation from the capture site |
|
234 * @param flags A bitmask containing flags that may influence the translation of this lambda expression. Defined |
|
235 * fields include FLAG_SERIALIZABLE and FLAG_MARKERS. |
|
236 * @param markerInterfaceCount If the FLAG_MARKERS flag is set, this is a count of the number of additional |
|
237 * marker interfaces |
|
238 * @param markerInterfaces If the FLAG_MARKERS flag is set, this consists of Class objects identifying additional |
|
239 * marker interfaces which the lambda object should implement, whose count equals |
|
240 * markerInterfaceCount |
|
241 * @return a CallSite, which, when invoked, will return an instance of the functional interface |
228 * @return a CallSite, which, when invoked, will return an instance of the functional interface |
242 * @throws ReflectiveOperationException |
229 * @throws ReflectiveOperationException |
243 * @throws LambdaConversionException If any of the meta-factory protocol invariants are violated |
230 * @throws LambdaConversionException If any of the meta-factory protocol invariants are violated |
244 */ |
231 */ |
245 public static CallSite altMetaFactory(MethodHandles.Lookup caller, |
232 public static CallSite altMetaFactory(MethodHandles.Lookup caller, |