Class ClassImpl

java.lang.Object
org.testng.internal.ClassImpl
All Implemented Interfaces:
IClass

public class ClassImpl extends Object implements IClass
Implementation of an IClass.
  • Constructor Details

  • Method Details

    • getTestName

      public String getTestName()
      Specified by:
      getTestName in interface IClass
      Returns:
      its test name if this class implements org.testng.ITest, null otherwise.
    • getName

      public String getName()
      Specified by:
      getName in interface IClass
      Returns:
      this test class name. This is the name of the corresponding Java class.
    • getRealClass

      public Class<?> getRealClass()
      Specified by:
      getRealClass in interface IClass
      Returns:
      the Java class corresponding to this IClass.
    • getInstanceHashCodes

      public long[] getInstanceHashCodes()
      Specified by:
      getInstanceHashCodes in interface IClass
    • getXmlTest

      public XmlTest getXmlTest()
      Specified by:
      getXmlTest in interface IClass
      Returns:
      the <test> tag this class was found in.
    • getXmlClass

      public XmlClass getXmlClass()
      Specified by:
      getXmlClass in interface IClass
      Returns:
      the *lt;class> tag this class was found in.
    • getParentInjector

      @Deprecated public com.google.inject.Injector getParentInjector(IInjectorFactory injectorFactory)
      Deprecated.
      - This method stands deprecated as of TestNG 7.3.0
    • getInstances

      public Object[] getInstances(boolean create)
      Description copied from interface: IClass
      Returns all the instances the methods will be invoked upon. This will typically be an array of one object in the absence of a @Factory annotation.
      Specified by:
      getInstances in interface IClass
      Parameters:
      create - flag if a new set of instances must be returned (if set to false)
      Returns:
      All the instances the methods will be invoked upon.
    • getInstances

      public Object[] getInstances(boolean create, String errorMsgPrefix)
      Specified by:
      getInstances in interface IClass
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • addInstance

      public void addInstance(Object instance)
      Specified by:
      addInstance in interface IClass