Package org.testng.internal
Class DataProviderMethod
- java.lang.Object
-
- org.testng.internal.DataProviderMethod
-
- All Implemented Interfaces:
IDataProviderMethod
class DataProviderMethod extends java.lang.Object implements IDataProviderMethod
Represents an @DataProvider
annotated method.
-
-
Field Summary
Fields Modifier and Type Field Description private IDataProviderAnnotation
annotation
private java.lang.Object
instance
private java.lang.reflect.Method
method
-
Constructor Summary
Constructors Constructor Description DataProviderMethod(java.lang.Object instance, java.lang.reflect.Method method, IDataProviderAnnotation annotation)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<java.lang.Integer>
getIndices()
Which indices to run from this data provider, default: all.java.lang.Object
getInstance()
java.lang.reflect.Method
getMethod()
java.lang.String
getName()
The name of this DataProvider.boolean
isParallel()
Whether this data provider should be run in parallel.
-
-
-
Field Detail
-
instance
private final java.lang.Object instance
-
method
private final java.lang.reflect.Method method
-
annotation
private final IDataProviderAnnotation annotation
-
-
Constructor Detail
-
DataProviderMethod
DataProviderMethod(java.lang.Object instance, java.lang.reflect.Method method, IDataProviderAnnotation annotation)
-
-
Method Detail
-
getInstance
public java.lang.Object getInstance()
- Specified by:
getInstance
in interfaceIDataProviderMethod
- Returns:
- - The instance to which the data provider belongs to.
null
if the data provider is a static one.
-
getMethod
public java.lang.reflect.Method getMethod()
- Specified by:
getMethod
in interfaceIDataProviderMethod
- Returns:
- - A
Method
object that represents the actual @DataProvider
method.
-
getName
public java.lang.String getName()
Description copied from interface:IDataProviderMethod
The name of this DataProvider.- Specified by:
getName
in interfaceIDataProviderMethod
-
isParallel
public boolean isParallel()
Description copied from interface:IDataProviderMethod
Whether this data provider should be run in parallel.- Specified by:
isParallel
in interfaceIDataProviderMethod
-
getIndices
public java.util.List<java.lang.Integer> getIndices()
Description copied from interface:IDataProviderMethod
Which indices to run from this data provider, default: all.- Specified by:
getIndices
in interfaceIDataProviderMethod
-
-