use of com.netflix.ribbon.proxy.processor.AnnotationProcessor in project ribbon by Netflix.
the class ServiceLoaderTest method testServiceLoader.
@Test
public void testServiceLoader() {
AnnotationProcessorsProvider annotations = AnnotationProcessorsProvider.DEFAULT;
List<AnnotationProcessor> processors = annotations.getProcessors();
boolean hasEVCacheProcessor = false;
for (AnnotationProcessor processor : processors) {
Class<?> clazz = processor.getClass();
if (clazz.equals(EVCacheAnnotationProcessor.class)) {
hasEVCacheProcessor = true;
break;
}
}
assertTrue(hasEVCacheProcessor);
}
use of com.netflix.ribbon.proxy.processor.AnnotationProcessor in project ribbon by Netflix.
the class ProxyHttpResourceGroupFactory method createResourceGroup.
public HttpResourceGroup createResourceGroup() {
Class<? extends HttpResourceGroup> resourceClass = classTemplate.getResourceGroupClass();
if (resourceClass != null) {
return Utils.newInstance(resourceClass);
} else {
String name = classTemplate.getResourceGroupName();
if (name == null) {
name = classTemplate.getClientInterface().getSimpleName();
}
HttpResourceGroup.Builder builder = httpResourceGroupFactory.createHttpResourceGroupBuilder(name);
for (AnnotationProcessor processor : processors.getProcessors()) {
processor.process(name, builder, httpResourceGroupFactory, classTemplate.getClientInterface());
}
return builder.build();
}
}
Aggregations