291 { InvocationHandler.class };
292
293 /**
294 * a cache of proxy constructors with
295 * {@link Constructor#setAccessible(boolean) accessible} flag already set
296 */
297 private static final ClassLoaderValue<Constructor<?>> proxyCache =
298 new ClassLoaderValue<>();
299
300 /**
301 * System property to revert to generation of proxy class files for version 1.5 (V49).
302 * Set to "true" to generate v49 class file format.
303 */
304 private static final boolean PROXY_GENERATOR_V49 =
305 GetBooleanAction.privilegedGetProperty("jdk.proxy.ProxyGenerator.v49");
306
307 /**
308 * the invocation handler for this proxy instance.
309 * @serial
310 */
311 protected InvocationHandler h;
312
313 /**
314 * Prohibits instantiation.
315 */
316 private Proxy() {
317 }
318
319 /**
320 * Constructs a new {@code Proxy} instance from a subclass
321 * (typically, a dynamic proxy class) with the specified value
322 * for its invocation handler.
323 *
324 * @param h the invocation handler for this proxy instance
325 *
326 * @throws NullPointerException if the given invocation handler, {@code h},
327 * is {@code null}.
328 */
329 protected Proxy(InvocationHandler h) {
330 Objects.requireNonNull(h);
|
291 { InvocationHandler.class };
292
293 /**
294 * a cache of proxy constructors with
295 * {@link Constructor#setAccessible(boolean) accessible} flag already set
296 */
297 private static final ClassLoaderValue<Constructor<?>> proxyCache =
298 new ClassLoaderValue<>();
299
300 /**
301 * System property to revert to generation of proxy class files for version 1.5 (V49).
302 * Set to "true" to generate v49 class file format.
303 */
304 private static final boolean PROXY_GENERATOR_V49 =
305 GetBooleanAction.privilegedGetProperty("jdk.proxy.ProxyGenerator.v49");
306
307 /**
308 * the invocation handler for this proxy instance.
309 * @serial
310 */
311 @SuppressWarnings("serial") // Not statically typed as Serializable
312 protected InvocationHandler h;
313
314 /**
315 * Prohibits instantiation.
316 */
317 private Proxy() {
318 }
319
320 /**
321 * Constructs a new {@code Proxy} instance from a subclass
322 * (typically, a dynamic proxy class) with the specified value
323 * for its invocation handler.
324 *
325 * @param h the invocation handler for this proxy instance
326 *
327 * @throws NullPointerException if the given invocation handler, {@code h},
328 * is {@code null}.
329 */
330 protected Proxy(InvocationHandler h) {
331 Objects.requireNonNull(h);
|