use of org.apache.sling.models.annotations.injectorspecific.OSGiService in project sling by apache.
the class OSGiServiceInjector method getValue.
public Object getValue(@Nonnull Object adaptable, String name, @Nonnull Type type, @Nonnull AnnotatedElement element, @Nonnull DisposalCallbackRegistry callbackRegistry) {
OSGiService annotation = element.getAnnotation(OSGiService.class);
String filterString = null;
if (annotation != null) {
if (StringUtils.isNotBlank(annotation.filter())) {
filterString = annotation.filter();
}
} else {
Filter filter = element.getAnnotation(Filter.class);
if (filter != null) {
filterString = filter.value();
}
}
return getValue(adaptable, type, filterString, callbackRegistry);
}
Aggregations