src/java.base/share/classes/java/lang/invoke/MethodHandles.java
changeset 48826 c4d9d1b08e2e
parent 48544 050352ed64d5
child 49432 f76e1ac74f28
equal deleted inserted replaced
48825:ef8a98bc71f8 48826:c4d9d1b08e2e
    96      * This lookup object is a <em>capability</em> which may be delegated to trusted agents.
    96      * This lookup object is a <em>capability</em> which may be delegated to trusted agents.
    97      * Do not store it in place where untrusted code can access it.
    97      * Do not store it in place where untrusted code can access it.
    98      * <p>
    98      * <p>
    99      * This method is caller sensitive, which means that it may return different
    99      * This method is caller sensitive, which means that it may return different
   100      * values to different callers.
   100      * values to different callers.
   101      * <p>
       
   102      * For any given caller class {@code C}, the lookup object returned by this call
       
   103      * has equivalent capabilities to any lookup object
       
   104      * supplied by the JVM to the bootstrap method of an
       
   105      * <a href="package-summary.html#indyinsn">invokedynamic instruction</a>
       
   106      * executing in the same caller class {@code C}.
       
   107      * @return a lookup object for the caller of this method, with private access
   101      * @return a lookup object for the caller of this method, with private access
   108      */
   102      */
   109     @CallerSensitive
   103     @CallerSensitive
   110     @ForceInline // to ensure Reflection.getCallerClass optimization
   104     @ForceInline // to ensure Reflection.getCallerClass optimization
   111     public static Lookup lookup() {
   105     public static Lookup lookup() {