1 package org.testng.annotations; 2 3 import java.lang.annotation.Retention; 4 import java.lang.annotation.Target; 5 6 /** 7 * Marks a method as the object factory to use for creating all test instances. 8 * The test classes can only contain one method marked with this annotation, 9 * and the method must return an instance of {@link org.testng.ITestObjectFactory}. 10 * 11 * @author Hani Suleiman 12 * @since 5.6 13 */ 14 @Retention(java.lang.annotation.RetentionPolicy.RUNTIME) 15 @Target(java.lang.annotation.ElementType.METHOD) 16 public @interface ObjectFactory 17 { 18 } 19