Top Description Fields Constructors Methods
org.testng.internal.objects

pack-priv Class SimpleObjectDispenser

extends Object
implements IObjectDispenser
Class Inheritance
All Implemented Interfaces
org.testng.internal.objects.IObjectDispenser
Imports
java.lang.reflect.Constructor, .Modifier, java.util.Map, org.testng.IClass, .ITestObjectFactory, .TestNGException, org.testng.annotations.IFactoryAnnotation, .IParametersAnnotation, org.testng.internal.IObject, .Parameters, org.testng.internal.annotations.IAnnotationFinder, org.testng.internal.objects.pojo.BasicAttributes, .CreationAttributes, .DetailedAttributes, org.testng.util.Strings, org.testng.xml.XmlTest

A plain vanilla Object dispenser

Field Summary

Modifier and TypeField and Description
private final ITestObjectFactory

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
private static Object
computeParameters(Map<Class<?>, IClass> classes, Class<?> ec, ITestObjectFactory factory)

pack-priv static <T> T
createInstance(Class<T> declaringClass, Map<Class<?>, IClass> classes, XmlTest xmlTest, IAnnotationFinder finder, ITestObjectFactory objectFactory, boolean create, String errorMsgPrefix)

public Object
private static <T> Constructor<T>
findAnnotatedConstructor(IAnnotationFinder finder, Class<T> declaringClass)

Find the best constructor given the parameters found on the annotation

private static <T> T
instantiateUsingDefaultConstructor(Class<T> declaringClass, Map<Class<?>, IClass> classes, XmlTest xmlTest, ITestObjectFactory factory)

private static <T> T
public void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

objectFactoryback to summary
private final ITestObjectFactory objectFactory

Constructor Detail

SimpleObjectDispenserback to summary
pack-priv SimpleObjectDispenser(ITestObjectFactory objectFactory)

Method Detail

computeParametersback to summary
private static Object computeParameters(Map<Class<?>, IClass> classes, Class<?> ec, ITestObjectFactory factory) throws NoSuchMethodException
createInstanceback to summary
pack-priv static <T> T createInstance(Class<T> declaringClass, Map<Class<?>, IClass> classes, XmlTest xmlTest, IAnnotationFinder finder, ITestObjectFactory objectFactory, boolean create, String errorMsgPrefix)
dispenseback to summary
public Object dispense(CreationAttributes attributes)

Implements org.testng.internal.objects.IObjectDispenser.dispense.

Annotations
@Override
findAnnotatedConstructorback to summary
private static <T> Constructor<T> findAnnotatedConstructor(IAnnotationFinder finder, Class<T> declaringClass)

Find the best constructor given the parameters found on the annotation

instantiateUsingDefaultConstructorback to summary
private static <T> T instantiateUsingDefaultConstructor(Class<T> declaringClass, Map<Class<?>, IClass> classes, XmlTest xmlTest, ITestObjectFactory factory) throws NoSuchMethodException
instantiateUsingParameterizedConstructorback to summary
private static <T> T instantiateUsingParameterizedConstructor(IAnnotationFinder finder, Constructor<T> constructor, XmlTest xmlTest, ITestObjectFactory objectFactory)
setNextDispenserback to summary
public void setNextDispenser(IObjectDispenser dispenser)

Implements org.testng.internal.objects.IObjectDispenser.setNextDispenser.

Parameters
dispenser:IObjectDispenser

Doc from org.testng.internal.objects.IObjectDispenser.setNextDispenser.

- The IObjectDispenser to dispense

Annotations
@Override