Package org.testng

Interface IObjectFactory2

All Superinterfaces:
ITestObjectFactory

@Deprecated public interface IObjectFactory2 extends ITestObjectFactory
Deprecated.
- This interface stands deprecated as of TestNG 7.5.0
Factory used to create all test instances. This object factory only receives the class in parameter.
Since:
5.14.6
See Also:
  • Method Details

    • newInstance

      @Deprecated default Object newInstance(Class<?> cls)
      Deprecated.
      - This interface stands deprecated as of TestNG 7.5.0
      Parameters:
      cls - - The class for which a new instance is to be created
      Returns:
      - The newly created object.