final Factory factory = (Factory) context.get(Factory.class);
if (factory == null) {
return null;
}
if (hasPathAnnotation(type)) {
return factory.build(type);
}
for (final Method method : type.getMethods()) {
if (method.getAnnotation(Path.class) != null) {
return factory.build(type);
}