Class JavaLambdaUtils
java.lang.Object
io.temporal.internal.common.JavaLambdaUtils
-
Method Summary
Modifier and TypeMethodDescriptionstatic ObjectGet target of the method reference that was converted to a lambda.static SerializedLambdatoSerializedLambda(Object lambda) Unfortunate sorcery to reflect on lambda.
-
Method Details
-
getTarget
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
Unfortunate sorcery to reflect on lambda. Works only if function that lambda implements is serializable. This is whyFunctionsis needed as all its functions are serializable.- Parameters:
lambda- lambda that potentially implementsSerializable.- Returns:
- lambda in
SerializedLambdaform or null if its function doesn't implement Serializable.
-