final CucumberOptions cucumberOptions = clazz.getAnnotation(CucumberOptions.class);
if (cucumberOptions != null) {
final String[] cucumberGlues = cucumberOptions.glue();
if (cucumberGlues.length > 0) {
final ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
final JavaBackend javaBackend = new JavaBackend(new MultiLoader(classLoader));
final ScanGlue glue = new ScanGlue();
javaBackend.loadGlue(glue, asList(cucumberGlues));
glues.addAll(glue.classes);
}
}