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 @DataProviderannotated method.
-
-
Field Summary
Fields Modifier and Type Field Description private IDataProviderAnnotationannotationprivate java.lang.Objectinstanceprivate java.lang.reflect.Methodmethod
-
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()java.lang.ObjectgetInstance()java.lang.reflect.MethodgetMethod()java.lang.StringgetName()booleanisParallel()
-
-
-
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:
getInstancein interfaceIDataProviderMethod- Returns:
- - The instance to which the data provider belongs to.
nullif the data provider is a static one.
-
getMethod
public java.lang.reflect.Method getMethod()
- Specified by:
getMethodin interfaceIDataProviderMethod- Returns:
- - A
Methodobject that represents the actual @DataProvidermethod.
-
getName
public java.lang.String getName()
- Specified by:
getNamein interfaceIDataProviderMethod- Returns:
- The name of this DataProvider.
-
isParallel
public boolean isParallel()
- Specified by:
isParallelin interfaceIDataProviderMethod- Returns:
- Whether this data provider should be run in parallel.
-
getIndices
public java.util.List<java.lang.Integer> getIndices()
- Specified by:
getIndicesin interfaceIDataProviderMethod- Returns:
- Which indices to run from this data provider, default: all.
-
-