private <T> void registerDecorators(Class<T> targetClass, HashMap<Class<?>, Annotation> meta, Annotation[] annotations) { for (Annotation annotation : annotations) { Decorators decorators = annotation.annotationType().getAnnotation(Decorators.class); if (decorators != null) { for (Decorator decorator : decorators.values()) { putMeta(targetClass, meta, annotation, decorator); } } else { Decorator decorator = annotation.annotationType().getAnnotation(Decorator.class); putMeta(targetClass, meta, annotation, decorator); } } }
public <T> boolean hasDecorator(Class<T> targetClass, Annotation[] annotations) { if (targetClass == null || annotations == null) return false; for (Annotation annotation : annotations) { Decorators decorators = annotation.annotationType().getAnnotation(Decorators.class); if (decorators != null) { for (Decorator decorator : decorators.values()) { if (decorator != null && decorator.target().isAssignableFrom(targetClass)) return true; } } else { Decorator decorator = annotation.annotationType().getAnnotation(Decorator.class); if (decorator != null && decorator.target().isAssignableFrom(targetClass)) return true; } } return false; }
for (Decorator decorator : decorators.values()) { injectDecorator(typeMap, decoratorAnnotation, decorator); Decorators decorators = decoratorAnnotation.getAnnotation(Decorators.class); if (decorators != null) { for (Decorator decorator : decorators.values()) { if (decorator.target().isAssignableFrom(target.getClass())) { target = doDecoration(target, type, annotations, mediaType, annotation, decorator);
private <T> void registerDecorators(Class<T> targetClass, HashMap<Class<?>, Annotation> meta, Annotation[] annotations) { for (Annotation annotation : annotations) { Decorators decorators = annotation.annotationType().getAnnotation(Decorators.class); if (decorators != null) { for (Decorator decorator : decorators.values()) { putMeta(targetClass, meta, annotation, decorator); } } else { Decorator decorator = annotation.annotationType().getAnnotation(Decorator.class); putMeta(targetClass, meta, annotation, decorator); } } }
public <T> boolean hasDecorator(Class<T> targetClass, Annotation[] annotations) { if (targetClass == null || annotations == null) return false; for (Annotation annotation : annotations) { Decorators decorators = annotation.annotationType().getAnnotation(Decorators.class); if (decorators != null) { for (Decorator decorator : decorators.values()) { if (decorator != null && decorator.target().isAssignableFrom(targetClass)) return true; } } else { Decorator decorator = annotation.annotationType().getAnnotation(Decorator.class); if (decorator != null && decorator.target().isAssignableFrom(targetClass)) return true; } } return false; }
for (Decorator decorator : decorators.values()) { injectDecorator(typeMap, decoratorAnnotation, decorator); Decorators decorators = decoratorAnnotation.getAnnotation(Decorators.class); if (decorators != null) { for (Decorator decorator : decorators.values()) { if (decorator.target().isAssignableFrom(target.getClass())) { target = doDecoration(target, type, annotations, mediaType, annotation, decorator);