Package org.testng.internal
Class ClassImpl
- java.lang.Object
-
- org.testng.internal.ClassImpl
-
-
Constructor Summary
Constructors Constructor Description ClassImpl(ITestContext context, java.lang.Class<?> cls, XmlClass xmlClass, java.lang.Object instance, java.util.Map<java.lang.Class<?>,IClass> classes, IAnnotationFinder annotationFinder, ITestObjectFactory objectFactory)
ClassImpl(ITestContext context, java.lang.Class<?> cls, XmlClass xmlClass, java.lang.Object instance, java.util.Map<java.lang.Class<?>,IClass> classes, XmlTest xmlTest, IAnnotationFinder annotationFinder, ITestObjectFactory objectFactory)
Deprecated.- This constructor is un-used within TestNG and hence stands deprecated as of TestNG v6.13
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
addInstance(java.lang.Object instance)
int
getInstanceCount()
Deprecated.long[]
getInstanceHashCodes()
java.lang.Object[]
getInstances(boolean create)
Returns all the instances the methods will be invoked upon.java.lang.String
getName()
com.google.inject.Injector
getParentInjector()
java.lang.Class
getRealClass()
java.lang.String
getTestName()
If this class implements org.testng.ITest, returns its test name, otherwise returns null.XmlClass
getXmlClass()
XmlTest
getXmlTest()
java.lang.String
toString()
-
-
-
Constructor Detail
-
ClassImpl
@Deprecated public ClassImpl(ITestContext context, java.lang.Class<?> cls, XmlClass xmlClass, java.lang.Object instance, java.util.Map<java.lang.Class<?>,IClass> classes, XmlTest xmlTest, IAnnotationFinder annotationFinder, ITestObjectFactory objectFactory)
Deprecated.- This constructor is un-used within TestNG and hence stands deprecated as of TestNG v6.13
-
ClassImpl
public ClassImpl(ITestContext context, java.lang.Class<?> cls, XmlClass xmlClass, java.lang.Object instance, java.util.Map<java.lang.Class<?>,IClass> classes, IAnnotationFinder annotationFinder, ITestObjectFactory objectFactory)
-
-
Method Detail
-
getTestName
public java.lang.String getTestName()
Description copied from interface:IClass
If this class implements org.testng.ITest, returns its test name, otherwise returns null.- Specified by:
getTestName
in interfaceIClass
-
getName
public java.lang.String getName()
-
getRealClass
public java.lang.Class getRealClass()
- Specified by:
getRealClass
in interfaceIClass
- Returns:
- the Java class corresponding to this IClass.
-
getInstanceCount
@Deprecated public int getInstanceCount()
Deprecated.- Specified by:
getInstanceCount
in interfaceIClass
- 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.
-
getInstanceHashCodes
public long[] getInstanceHashCodes()
- Specified by:
getInstanceHashCodes
in interfaceIClass
-
getXmlTest
public XmlTest getXmlTest()
- Specified by:
getXmlTest
in interfaceIClass
- Returns:
- the <test> tag this class was found in.
-
getXmlClass
public XmlClass getXmlClass()
- Specified by:
getXmlClass
in interfaceIClass
- Returns:
- the *lt;class> tag this class was found in.
-
getParentInjector
public com.google.inject.Injector getParentInjector()
-
getInstances
public java.lang.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 interfaceIClass
- 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.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
addInstance
public void addInstance(java.lang.Object instance)
- Specified by:
addInstance
in interfaceIClass
-
-