mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +02:00
8223726: j.l.c.MethodTypeDesc spec should contain precise assertions for one parameter's methods
Reviewed-by: darcy
This commit is contained in:
parent
11b6437c01
commit
fa2ea6a6d8
4 changed files with 49 additions and 7 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -177,7 +177,7 @@ public interface MethodHandleDesc
|
|||
* @param paramTypes {@link ClassDesc}s describing the parameter types of
|
||||
* the constructor
|
||||
* @return the {@linkplain MethodHandleDesc}
|
||||
* @throws NullPointerException if any of the arguments are null
|
||||
* @throws NullPointerException if any argument or its contents is {@code null}
|
||||
*/
|
||||
static DirectMethodHandleDesc ofConstructor(ClassDesc owner,
|
||||
ClassDesc... paramTypes) {
|
||||
|
@ -191,6 +191,7 @@ public interface MethodHandleDesc
|
|||
*
|
||||
* @param type a {@link MethodHandleDesc} describing the new method type
|
||||
* @return a {@linkplain MethodHandleDesc} for the adapted method handle
|
||||
* @throws NullPointerException if the argument is {@code null}
|
||||
*/
|
||||
default MethodHandleDesc asType(MethodTypeDesc type) {
|
||||
return (invocationType().equals(type)) ? this : new AsTypeMethodHandleDesc(this, type);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue