for (IType t : compUnit.getTypes()) {
for (IMethod method : t.getMethods()) {
for (IAnnotation annotation : method.getAnnotations()) {
CucumberAnnotation cukeAnnotation = getCukeAnnotation(importedAnnotations, annotation);
if (cukeAnnotation != null) {
Step step = new Step();
step.setSource(method.getResource());
step.setText(getAnnotationText(annotation));
step.setLineNumber(getLineNumber(compUnit, annotation));
step.setLang(cukeAnnotation.getLang());
steps.add(step);
}
}
}