Package org.testng.internal
Class ObjectBag
java.lang.Object
org.testng.internal.ObjectBag
A 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 -
Method Summary
Modifier and TypeMethodDescriptionvoid
cleanup()
static void
createIfRequired
(Class<?> type, Supplier<Object> supplier) static ObjectBag
getInstance
(ISuite suite) static ObjectBag
getInstance
(XmlSuite xmlSuite)
-
Constructor Details
-
ObjectBag
public ObjectBag()
-
-
Method Details
-
getInstance
-
getInstance
-
cleanup
-
createIfRequired
- Parameters:
type
- - The type of the object to be createdsupplier
- - ASupplier
that should be used to produce a new instance- Returns:
- - Either the newly produced instance or the existing instance.
-
cleanup
public void cleanup()
-