1 package test.objectfactory;
2 
3 import org.testng.internal.ObjectFactoryImpl;
4 
5 import java.lang.reflect.Constructor;
6 
7 /**
8  * @author Hani Suleiman
9  *         Date: Mar 6, 2007
10  *         Time: 3:53:28 PM
11  */
12 public class LoggingObjectFactory extends ObjectFactoryImpl
13 {
14   /**
15    *
16    */
17   private static final long serialVersionUID = -395096650866727480L;
18   public static int invoked;
19 
20   @Override
newInstance(Constructor constructor, Object... params)21   public Object newInstance(Constructor constructor, Object... params)
22   {
23     invoked++;
24     return super.newInstance(constructor, params);
25   }
26 }
27