src/java.base/share/classes/java/lang/invoke/MethodHandle.java
changeset 50735 2f2af62dfac7
parent 48452 d3b1fc1bda9c
child 51986 c1db377f6300
equal deleted inserted replaced
50734:0828a0f6676b 50735:2f2af62dfac7
     1 /*
     1 /*
     2  * Copyright (c) 2008, 2017, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2008, 2018, 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
   248  * <p>
   248  * <p>
   249  * A non-virtual method handle to a specific virtual method implementation
   249  * A non-virtual method handle to a specific virtual method implementation
   250  * can also be created.  These do not perform virtual lookup based on
   250  * can also be created.  These do not perform virtual lookup based on
   251  * receiver type.  Such a method handle simulates the effect of
   251  * receiver type.  Such a method handle simulates the effect of
   252  * an {@code invokespecial} instruction to the same method.
   252  * an {@code invokespecial} instruction to the same method.
       
   253  * A non-virtual method handle can also be created to simulate the effect
       
   254  * of an {@code invokevirtual} or {@code invokeinterface} instruction on
       
   255  * a private method (as applicable).
   253  *
   256  *
   254  * <h1>Usage examples</h1>
   257  * <h1>Usage examples</h1>
   255  * Here are some examples of usage:
   258  * Here are some examples of usage:
   256  * <blockquote><pre>{@code
   259  * <blockquote><pre>{@code
   257 Object x, y; String s; int i;
   260 Object x, y; String s; int i;