package org.testng;

import org.testng.xml.XmlClass;
import org.testng.xml.XmlTest;

IClass represents a test class and a collection of its instances.
/** * <code>IClass</code> represents a test class and a collection of its instances. */
public interface IClass {
Returns:this test class name. This is the name of the corresponding Java class.
/** * @return this test class name. This is the name of the * corresponding Java class. */
String getName();
Returns:the <test> tag this class was found in.
/** * @return the &lt;test&gt; tag this class was found in. */
XmlTest getXmlTest();
Returns:the *lt;class> tag this class was found in.
/** * @return the *lt;class&gt; tag this class was found in. */
XmlClass getXmlClass();
If this class implements org.testng.ITest, returns its test name, otherwise returns null.
/** * If this class implements org.testng.ITest, returns its test name, otherwise returns null. */
String getTestName();
Returns:the Java class corresponding to this IClass.
/** * @return the Java class corresponding to this IClass. */
Class<?> getRealClass();
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.
Params:
  • 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.
/** * 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. * * @param create flag if a new set of instances must be returned * (if set to <tt>false</tt>) * @return All the instances the methods will be invoked upon. */
Object[] getInstances(boolean create);
Deprecated:Not used
Returns:The number of instances used in this class. This method is needed for serialization since we don't know ahead of time if the instances of the test classes will be serializable.
/** * @deprecated Not used * * @return The number of instances used in this class. This method * is needed for serialization since we don't know ahead of time if the * instances of the test classes will be serializable. */
@Deprecated int getInstanceCount(); long[] getInstanceHashCodes(); void addInstance(Object instance); }