Home | History | Annotate | Download | only in testng
      1 package org.testng;
      2 
      3 import org.testng.xml.XmlClass;
      4 import org.testng.xml.XmlTest;
      5 
      6 import java.io.Serializable;
      7 
      8 /**
      9  * <code>IClass</code> represents a test class and a collection of its instances.
     10  *
     11  * @author <a href = "mailto:cedric&#64;beust.com">Cedric Beust</a>
     12  */
     13 public interface IClass extends Serializable {
     14 
     15   /**
     16    * @return this test class name.  This is the name of the
     17    * corresponding Java class.
     18    */
     19   String getName();
     20 
     21   /**
     22    * @return the &lt;test&gt; tag this class was found in.
     23    */
     24   XmlTest getXmlTest();
     25 
     26   /**
     27    * @return the *lt;class&gt; tag this class was found in.
     28    */
     29   XmlClass getXmlClass();
     30 
     31   /**
     32    * If this class implements ITest, returns its test name, otherwise returns null.
     33    */
     34   String getTestName();
     35 
     36   /**
     37    * @return the Java class corresponding to this IClass.
     38    */
     39   Class getRealClass();
     40 
     41   Object[] getInstances(boolean create);
     42 
     43   int getInstanceCount();
     44 
     45   long[] getInstanceHashCodes();
     46 
     47   void addInstance(Object instance);
     48 }
     49