Top Description Methods
org.testng

public Interface IClass

Known Direct Subinterfaces
org.testng.ITestClass
Known Direct Implementers
org.testng.internal.ClassImpl
Imports
org.testng.xml.XmlClass, .XmlTest

IClass represents a test class and a collection of its instances.

Method Summary

Modifier and TypeMethod and Description
public void
addInstance(Object
- The instance to be added.
instance
)

Deprecated - As of TestNG v7.10.0
public long[]
getInstanceHashCodes()

Deprecated - As of TestNG v7.10.0
public Object[]

Returns:

All the instances the methods will be invoked upon.
getInstances
(boolean
flag if a new set of instances must be returned (if set to false)
create
)

Deprecated - As of TestNG v7.10.0
Returns all the instances the methods will be invoked upon.
public default Object[]

Returns:

All the instances the methods will be invoked upon.
getInstances
(boolean
flag if a new set of instances must be returned (if set to false)
create
,
String
- Text that should be prefixed to the error message when there are issues. Can be empty.
errorMsgPrefix
)

Deprecated - As of TestNG v7.10.0
Returns all the instances the methods will be invoked upon.
public String

Returns:

this test class name. This is the name of the corresponding Java class.
getName
()

public Class<?>

Returns:

the Java class corresponding to this IClass.
getRealClass
()

public String

Returns:

its test name if this class implements org.testng.ITest, null otherwise.
getTestName
()

public XmlClass

Returns:

the *lt;class> tag this class was found in.
getXmlClass
()

public XmlTest

Returns:

the <test> tag this class was found in.
getXmlTest
()

Method Detail

addInstanceback to summary
public void addInstance(Object instance)

Deprecated

- As of TestNG v7.10.0

Parameters
instance:Object

- The instance to be added.

Annotations
@Deprecated
getInstanceHashCodesback to summary
public long[] getInstanceHashCodes()

Deprecated

- As of TestNG v7.10.0

Annotations
@Deprecated
getInstancesback to summary
public Object[] getInstances(boolean create)

Deprecated

- As of TestNG v7.10.0

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.

Parameters
create:boolean

flag if a new set of instances must be returned (if set to false)

Returns:Object[]

All the instances the methods will be invoked upon.

Annotations
@Deprecated
getInstancesback to summary
public default Object[] getInstances(boolean create, String errorMsgPrefix)

Deprecated

- As of TestNG v7.10.0

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.

Parameters
create:boolean

flag if a new set of instances must be returned (if set to false)

errorMsgPrefix:String

- Text that should be prefixed to the error message when there are issues. Can be empty.

Returns:Object[]

All the instances the methods will be invoked upon.

Annotations
@Deprecated
getNameback to summary
public String getName()
Returns:String

this test class name. This is the name of the corresponding Java class.

getRealClassback to summary
public Class<?> getRealClass()
Returns:Class<?>

the Java class corresponding to this IClass.

getTestNameback to summary
public String getTestName()
Returns:String

its test name if this class implements org.testng.ITest, null otherwise.

getXmlClassback to summary
public XmlClass getXmlClass()
Returns:XmlClass

the *lt;class> tag this class was found in.

getXmlTestback to summary
public XmlTest getXmlTest()
Returns:XmlTest

the <test> tag this class was found in.