};
}
@SuppressWarnings("unused")
private void processAnnotatedType(@Observes final ProcessAnnotatedType processAnnotatedType) {
final AnnotatedType annotatedType = processAnnotatedType.getAnnotatedType();
if (customHk2TypesProvider != null) {
final Type baseType = annotatedType.getBaseType();
if (customHk2TypesProvider.getHk2Types().contains(baseType)) {
processAnnotatedType.veto();
jerseyVetoedTypes.add(baseType);
}
}
if (containsJaxRsParameterizedCtor(annotatedType)) {
processAnnotatedType.setAnnotatedType(new AnnotatedType() {
@Override
public Class getJavaClass() {
return annotatedType.getJavaClass();
}
@Override
public Set<AnnotatedConstructor> getConstructors() {
Set<AnnotatedConstructor> result = new HashSet<AnnotatedConstructor>();
for (AnnotatedConstructor c : (Set<AnnotatedConstructor>) annotatedType.getConstructors()) {
result.add(enrichedConstructor(c));
}
return result;
}
@Override
public Set getMethods() {
return annotatedType.getMethods();
}
@Override
public Set getFields() {
return annotatedType.getFields();
}
@Override
public Type getBaseType() {
return annotatedType.getBaseType();
}
@Override
public Set<Type> getTypeClosure() {
return annotatedType.getTypeClosure();
}
@Override
public <T extends Annotation> T getAnnotation(Class<T> annotationType) {
return annotatedType.getAnnotation(annotationType);
}
@Override
public Set<Annotation> getAnnotations() {
return annotatedType.getAnnotations();
}
@Override
public boolean isAnnotationPresent(Class<? extends Annotation> annotationType) {
return annotatedType.isAnnotationPresent(annotationType);
}
});
}
}