Top Description Fields Constructors Methods
org.testng.internal

public Class FactoryMethod

extends BaseTestMethod
Class Inheritance
Imports
java.lang.reflect.Modifier, java.util.Arrays, .HashSet, .Iterator, .List, .Map, .Set, java.util.stream.Collectors, org.testng.DataProviderHolder, .IDataProviderInterceptor, .IDataProviderListener, .IInstanceInfo, .ITestContext, .ITestMethodFinder, .ITestNGListener, .ITestNGMethod, .ITestObjectFactory, .TestNGException, org.testng.annotations.IFactoryAnnotation, .IListenersAnnotation, org.testng.collections.Lists, .Maps, org.testng.internal.annotations.IAnnotationFinder, org.testng.xml.XmlTest

This class represents a method annotated with @Factory

Field Summary

Modifier and TypeField and Description
private final IFactoryAnnotation
private final DataProviderHolder
private String
private final Object
private final ITestContext
Inherited from org.testng.internal.BaseTestMethod:
m_afterGroupsm_annotationFinderm_beforeGroupsm_currentInvocationCountm_datem_groupsm_groupsDependedUponm_idm_methodm_methodClassm_methodsDependedUponm_objectFactorym_testClass

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public ITestNGMethod
clone()

Implements abstract org.testng.internal.BaseTestMethod.clone.

Implements org.testng.ITestNGMethod.clone.

Creates and returns a copy of this object.
private static String[]
getAllGroups(ITestObjectFactory objectFactory, Class<?> declaringClass, XmlTest xmlTest, IAnnotationFinder annotationFinder)

public String
private void
init(Object instance, IAnnotationFinder annotationFinder, ConstructorOrMethod com)

public IParameterInfo[]
Inherited from org.testng.internal.BaseTestMethod:
addFailedInvocationNumberaddMethodDependedUponcanRunFromClassdownstreamDependenciesequalsfindMethodParametersgetAfterGroupsgetAnnotationFindergetBeforeGroupsgetConstructorOrMethodgetCurrentInvocationCountgetDategetDescriptiongetEnabledgetFactoryMethodParamsInfogetFailedInvocationNumbersgetGroupsgetGroupsDependedUpongetIdgetInstancegetInstanceHashCodesgetInstanceIdgetInterceptedPrioritygetInvocationCountgetInvocationNumbersgetInvocationTimegetInvocationTimeOutgetMethodNamegetMethodsDependedUpongetMissingGroupgetParameterInvocationCountgetParameterTypesgetPrioritygetQualifiedNamegetRealClassgetRetryAnalyzergetRetryAnalyzerClassgetSignaturegetSimpleNamegetStringArraygetSuccessPercentagegetTestClassgetThreadPoolSizegetTimeOutgetXmlTesthashCodehasMoreInvocationignoreMissingDependenciesincrementCurrentInvocationCountinitBeforeAfterGroupsinitGroupsisAfterClassConfigurationisAfterGroupsConfigurationisAfterMethodConfigurationisAfterSuiteConfigurationisAfterTestConfigurationisAlwaysRunisBeforeClassConfigurationisBeforeGroupsConfigurationisBeforeMethodConfigurationisBeforeSuiteConfigurationisBeforeTestConfigurationisTestsetAlwaysRunsetDatesetDescriptionsetDownstreamDependenciessetEnabledsetGroupssetGroupsDependedUponsetIdsetIgnoreMissingDependenciessetInterceptedPrioritysetInvocationCountsetInvocationNumberssetInvocationTimeOutsetInvokedAtsetMethodsDependedUponsetMissingGroupsetMoreInvocationCheckersetParameterInvocationCountsetPrioritysetRetryAnalyzerClasssetSkipFailedInvocationssetTestClasssetThreadPoolSizesetTimeOutsetUpstreamDependenciessetXmlTestskipFailedInvocationsstringifytoStringupstreamDependencies

Field Detail

factoryAnnotationback to summary
private final IFactoryAnnotation factoryAnnotation
holderback to summary
private final DataProviderHolder holder
m_factoryCreationFailedMessageback to summary
private String m_factoryCreationFailedMessage
m_instanceback to summary
private final Object m_instance

Hides org.testng.internal.BaseTestMethod.m_instance.

m_testContextback to summary
private final ITestContext m_testContext

Constructor Detail

FactoryMethodback to summary
pack-priv FactoryMethod(ConstructorOrMethod com, IObject.IdentifiableObject identifiable, IAnnotationFinder annotationFinder, ITestContext testContext, ITestObjectFactory objectFactory, DataProviderHolder holder)

Method Detail

cloneback to summary
public ITestNGMethod clone()

Implements abstract org.testng.internal.BaseTestMethod.clone.

Implements org.testng.ITestNGMethod.clone.

Doc from java.lang.Object.clone.

Creates and returns a copy of this object. The precise meaning of "copy" may depend on the class of the object. The general intent is that, for any object x, the expression:

x.clone() != x
will be true, and that the expression:
x.clone().getClass() == x.getClass()
will be true, but these are not absolute requirements. While it is typically the case that:
x.clone().equals(x)
will be true, this is not an absolute requirement.

By convention, the returned object should be obtained by calling super.clone. If a class and all of its superclasses (except Object) obey this convention, it will be the case that x.clone().getClass() == x.getClass().

By convention, the object returned by this method should be independent of this object (which is being cloned). To achieve this independence, it may be necessary to modify one or more fields of the object returned by super.clone before returning it. Typically, this means copying any mutable objects that comprise the internal "deep structure" of the object being cloned and replacing the references to these objects with references to the copies. If a class contains only primitive fields or references to immutable objects, then it is usually the case that no fields in the object returned by super.clone need to be modified.

Returns:ITestNGMethod

a clone of this instance.

Annotations
@Override
getAllGroupsback to summary
private static String[] getAllGroups(ITestObjectFactory objectFactory, Class<?> declaringClass, XmlTest xmlTest, IAnnotationFinder annotationFinder)
getFactoryCreationFailedMessageback to summary
public String getFactoryCreationFailedMessage()
initback to summary
private void init(Object instance, IAnnotationFinder annotationFinder, ConstructorOrMethod com)
invokeback to summary
public IParameterInfo[] invoke()