public static ITestAnnotation findTest(IAnnotationFinder finder, Constructor ctor) {
return finder.findAnnotation(ctor, ITestAnnotation.class);
}
public static IConfigurationAnnotation findConfiguration(IAnnotationFinder finder, Constructor ctor) {
IConfigurationAnnotation result = finder.findAnnotation(ctor, IConfigurationAnnotation.class);
if (result == null) {
IConfigurationAnnotation bs = (IConfigurationAnnotation) finder.findAnnotation(ctor, IBeforeSuite.class);
IConfigurationAnnotation as = (IConfigurationAnnotation) finder.findAnnotation(ctor, IAfterSuite.class);
IConfigurationAnnotation bt = (IConfigurationAnnotation) finder.findAnnotation(ctor, IBeforeTest.class);
IConfigurationAnnotation at = (IConfigurationAnnotation) finder.findAnnotation(ctor, IAfterTest.class);
IConfigurationAnnotation bg = (IConfigurationAnnotation) finder.findAnnotation(ctor, IBeforeGroups.class);
IConfigurationAnnotation ag = (IConfigurationAnnotation) finder.findAnnotation(ctor, IAfterGroups.class);
IConfigurationAnnotation bc = (IConfigurationAnnotation) finder.findAnnotation(ctor, IBeforeClass.class);
IConfigurationAnnotation ac = (IConfigurationAnnotation) finder.findAnnotation(ctor, IAfterClass.class);
IConfigurationAnnotation bm = (IConfigurationAnnotation) finder.findAnnotation(ctor, IBeforeMethod.class);
IConfigurationAnnotation am = (IConfigurationAnnotation) finder.findAnnotation(ctor, IAfterMethod.class);
if (bs != null || as != null || bt != null || at != null || bg != null || ag != null
|| bc != null || ac != null || bm != null || am != null)
{
result = createConfiguration(bs, as, bt, at, bg, ag, bc, ac, bm, am);