use of org.glassfish.hk2.api.ClassAnalyzer in project jersey by jersey.
the class CdiComponentProvider method bindHk2ClassAnalyzer.
private void bindHk2ClassAnalyzer() {
ClassAnalyzer defaultClassAnalyzer = injectionManager.getInstance(ClassAnalyzer.class, ClassAnalyzer.DEFAULT_IMPLEMENTATION_NAME);
int skippedElements = methodsToSkip.size() + fieldsToSkip.size();
ClassAnalyzer customizedClassAnalyzer = skippedElements > 0 ? new InjecteeSkippingAnalyzer(defaultClassAnalyzer, methodsToSkip, fieldsToSkip) : defaultClassAnalyzer;
Binder binder = new AbstractBinder() {
@Override
protected void configure() {
bind(customizedClassAnalyzer).analyzeWith(ClassAnalyzer.DEFAULT_IMPLEMENTATION_NAME).to(ClassAnalyzer.class).named(CDI_CLASS_ANALYZER);
}
};
injectionManager.register(binder);
}
Aggregations