Class JavaLambdaUtils

java.lang.Object
io.temporal.internal.common.JavaLambdaUtils

public final class JavaLambdaUtils extends Object
  • Method Details

    • getTarget

      public static Object getTarget(SerializedLambda l)
      Get target of the method reference that was converted to a lambda.
      Parameters:
      l - lambda expression that could be a method reference.
      Returns:
      either target of the method reference or null if it is not reference in form object::method.
    • toSerializedLambda

      public static SerializedLambda toSerializedLambda(Object lambda)
      Unfortunate sorcery to reflect on lambda. Works only if function that lambda implements is serializable. This is why Functions is needed as all its functions are serializable.
      Parameters:
      lambda - lambda that potentially implements Serializable.
      Returns:
      lambda in SerializedLambda form or null if its function doesn't implement Serializable.