@Internal public class ClosureCleaner extends Object
|Constructor and Description|
|Modifier and Type||Method and Description|
Tries to clean the closure of the given object, if the object is a non-static inner class.
public static void clean(Object func, ExecutionConfig.ClosureCleanerLevel level, boolean checkSerializable)
func- The object whose closure should be cleaned.
level- the clean up level.
checkSerializable- Flag to indicate whether serializability should be checked after the closure cleaning attempt.
InvalidProgramException- Thrown, if 'checkSerializable' is true, and the object was not serializable after the closure cleaning.
RuntimeException- A RuntimeException may be thrown, if the code of the class could not be loaded, in order to process during the closure cleaning.
public static void ensureSerializable(Object obj)
Copyright © 2014–2023 The Apache Software Foundation. All rights reserved.