Package org.testng.internal
Class ObjectBag
- java.lang.Object
-
- org.testng.internal.ObjectBag
-
public final class ObjectBag extends java.lang.ObjectA simple bean bag that is intended to help share objects during the lifetime of TestNG without needing it to be a singleton.
-
-
Constructor Summary
Constructors Constructor Description ObjectBag()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcleanup()static voidcleanup(ISuite suite)java.lang.ObjectcreateIfRequired(java.lang.Class<?> type, java.util.function.Supplier<java.lang.Object> supplier)static ObjectBaggetInstance(ISuite suite)static ObjectBaggetInstance(XmlSuite xmlSuite)
-
-
-
Method Detail
-
cleanup
public static void cleanup(ISuite suite)
-
createIfRequired
public java.lang.Object createIfRequired(java.lang.Class<?> type, java.util.function.Supplier<java.lang.Object> supplier)- Parameters:
type- - The type of the object to be createdsupplier- - ASupplierthat should be used to produce a new instance- Returns:
- - Either the newly produced instance or the existing instance.
-
cleanup
public void cleanup()
-
-