List<ITestNGMethod> vResult = Lists.newArrayList();
Set<Method> methods = ClassHelper.getAvailableMethods(clazz);
for(Method m : methods) {
IConfigurationAnnotation configuration = AnnotationHelper.findConfiguration(m_annotationFinder, m);
if(null == configuration) {
continue;
}
boolean create = false;
boolean isBeforeSuite = false;
boolean isAfterSuite = false;
boolean isBeforeTest = false;
boolean isAfterTest = false;
boolean isBeforeClass = false;
boolean isAfterClass = false;
boolean isBeforeTestMethod = false;
boolean isAfterTestMethod = false;
String[] beforeGroups = null;
String[] afterGroups = null;
switch(configurationType) {
case BEFORE_SUITE:
create = configuration.getBeforeSuite();
isBeforeSuite = true;
break;
case AFTER_SUITE:
create = configuration.getAfterSuite();
isAfterSuite = true;
break;
case BEFORE_TEST:
create = configuration.getBeforeTest();
isBeforeTest = true;
break;
case AFTER_TEST:
create = configuration.getAfterTest();
isAfterTest = true;
break;
case BEFORE_CLASS:
create = configuration.getBeforeTestClass();
isBeforeClass = true;
break;
case AFTER_CLASS:
create = configuration.getAfterTestClass();
isAfterClass = true;
break;
case BEFORE_TESTMETHOD:
create = configuration.getBeforeTestMethod();
isBeforeTestMethod = true;
break;
case AFTER_TESTMETHOD:
create = configuration.getAfterTestMethod();
isAfterTestMethod = true;
break;
case BEFORE_GROUPS:
beforeGroups = configuration.getBeforeGroups();
create = beforeGroups.length > 0;
isBeforeTestMethod = true;
break;
case AFTER_GROUPS:
afterGroups = configuration.getAfterGroups();
create = afterGroups.length > 0;
isBeforeTestMethod = true;
break;
}