ClosureCleaner
object ClosureCleaner
A cleaner that renders closures serializable if they can be done so safely.
Value members
Concrete methods
Clean the given closure in place.
Clean the given closure in place.
More specifically, this renders the given closure serializable as long as it does not explicitly reference unserializable objects.
- Value parameters:
- checkSerializable
whether to verify that the closure is serializable after cleaning
- cleanTransitively
whether to clean enclosing closures transitively
- closure
the closure to clean