Movatterモバイル変換


[0]ホーム

URL:


Scala 3
3.7.4
LearnInstallPlaygroundFind A LibraryCommunityBlog
Scala 3
LearnInstallPlaygroundFind A LibraryCommunityBlog
DocsAPI
Generated with
Copyright (c) 2002-2025, LAMP/EPFL
Copyright (c) 2002-2025, LAMP/EPFL
Scala 3/scala/scala.runtime/LambdaDeserializer

LambdaDeserializer

scala.runtime.LambdaDeserializer

This class is only intended to be called by synthetic$deserializeLambda$ method that the Scala 2.12 compiler will add to classes hosting lambdas.

It is not intended to be consumed directly.

Attributes

Source
LambdaDeserializer.scala
Graph
Supertypes
classObject
traitMatchable
classAny
Self type

Members list

Value members

Concrete methods

Deserialize a lambda by callingLambdaMetafactory.altMetafactory to spin up a lambda class and instantiating this class with the captured arguments.

Deserialize a lambda by callingLambdaMetafactory.altMetafactory to spin up a lambda class and instantiating this class with the captured arguments.

A cache may be provided to ensure that subsequent deserialization of the same lambda expression is cheap, it amounts to a reflective call to the constructor of the previously created class. However, deserialization of the same lambda expression is not guaranteed to use the same class, concurrent deserialization of the same lambda expression may spin up more than one class.

Assumptions: - No additional marker interfaces are required beyondjava.io.Serializable. These are not stored inSerializedLambda, so we can't reconstitute them. - No additional bridge methods are passed toaltMetafactory. Again, these are not stored.

Value parameters

cache

A cache used to avoid spinning up a class for each deserialization of a given lambda. May benull

lookup

The factory for method handles. Must have access to the implementation method, the functional interface class, andjava.io.Serializable.

serialized

The lambda to deserialize. Note that this is typically created by thereadResolve member of the anonymous class created byLambdaMetaFactory.

Attributes

Returns

An instance of the functional interface

Source
LambdaDeserializer.scala
In this article
Generated with
Copyright (c) 2002-2025, LAMP/EPFL
Copyright (c) 2002-2025, LAMP/EPFL

[8]ページ先頭

©2009-2025 Movatter.jp