< prev index next >

## src/java.base/share/classes/java/lang/invoke/SerializedLambda.java

Print this page

    @@ -1,7 +1,7 @@
      /*
    -  * Copyright (c) 2012, 2019, Oracle and/or its affiliates. All rights reserved.
    +  * Copyright (c) 2012, 2020, 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
       * under the terms of the GNU General Public License version 2 only, as
       * published by the Free Software Foundation.  Oracle designates this

    @@ -65,19 +65,49 @@
       * @since 1.8
       */
      public final class SerializedLambda implements Serializable {
          @java.io.Serial
          private static final long serialVersionUID = 8025925345765570181L;
    +     /**
    +      * The capturing class.
    +      */
          private final Class<?> capturingClass;
    +     /**
    +      * The functional interface class.
    +      */
          private final String functionalInterfaceClass;
    +     /**
    +      * The functional interface method name.
    +      */
          private final String functionalInterfaceMethodName;
    +     /**
    +      * The functional interface method signature.
    +      */
          private final String functionalInterfaceMethodSignature;
    +     /**
    +      * The implementation class.
    +      */
          private final String implClass;
    +     /**
    +      * The implementation method name.
    +      */
          private final String implMethodName;
    +     /**
    +      * The implementation method signature.
    +      */
          private final String implMethodSignature;
    +     /**
    +      * The implementation method kind.
    +      */
          private final int implMethodKind;
    +     /**
    +      * The instantiated method type.
    +      */
          private final String instantiatedMethodType;
    +     /**
    +      * The captured arguments.
    +      */
          @SuppressWarnings("serial") // Not statically typed as Serializable
          private final Object[] capturedArgs;

          /**
           * Create a {@code SerializedLambda} from the low-level information present

    @@ -225,10 +255,15 @@
           */
          public Object getCapturedArg(int i) {
              return capturedArgs[i];
          }

    +     /**
    +      * Resolve a {@code SerializedLambda} to an object.
    +      * @return a SerializedLambda
    +      * @throws ObjectStreamException if the object is not valid
    +      */
          @java.io.Serial
          private Object readResolve() throws ObjectStreamException {
              try {
                  Method deserialize = AccessController.doPrivileged(new PrivilegedExceptionAction<>() {
                      @Override

< prev index next >