@Override public Set<Annotation> getDelegateQualifiers() { return delegate().getDelegateQualifiers(); }
@Override public Set<Annotation> getDelegateQualifiers() { return delegate().getDelegateQualifiers(); }
@Override public Set<Annotation> getDelegateQualifiers() { return delegate().getDelegateQualifiers(); }
@Override public Set<Annotation> getDelegateQualifiers() { return delegate().getDelegateQualifiers(); }
@Override public Set<Annotation> getDelegateQualifiers() { return delegate().getDelegateQualifiers(); }
@Override public Set<Annotation> getDelegateQualifiers() { return delegate().getDelegateQualifiers(); }
public DecoratorEntry(InjectManager manager, Decorator<X> decorator, BaseType delegateType) { _decorator = decorator; _delegateType = delegateType; for (Annotation ann : decorator.getDelegateQualifiers()) { _bindings.add(new QualifierBinding(ann)); } if (_bindings.size() == 0) _bindings.add(new QualifierBinding(DefaultLiteral.DEFAULT)); for (Type type: decorator.getDecoratedTypes()) { _decoratedTypes.add(manager.createSourceBaseType(type)); } }
@SuppressWarnings("unchecked") @Test @SpecAssertions({ @SpecAssertion(section = DELEGATE_ATTRIBUTE, id = "a"), @SpecAssertion(section = DECORATOR, id = "c") }) public void testDelegateInjectionPoint() { List<Decorator<?>> decorators = getCurrentManager().resolveDecorators(Logger.TYPES); assertEquals(decorators.size(), 1); Decorator<?> decorator = decorators.get(0); assertEquals(decorator.getInjectionPoints().size(), 1); assertEquals(decorator.getInjectionPoints().iterator().next().getType(),Logger.class); assertTrue(decorator.getInjectionPoints().iterator().next().getAnnotated().isAnnotationPresent(Delegate.class)); assertEquals(decorator.getDelegateType(), Logger.class); assertEquals(decorator.getDelegateQualifiers().size(), 1); assertAnnotationSetMatches(decorator.getDelegateQualifiers(), Default.class); }
private void validateDecorator(Decorator<?> decorator) { Set<Annotation> qualifiers = decorator.getDelegateQualifiers(); if (decorator.getDelegateType() == null) { throw BeanLogger.LOG.decoratorMethodReturnsNull("getDelegateType", decorator); } Bindings.validateQualifiers(qualifiers, getBeanManager(), decorator, "Decorator.getDelegateQualifiers"); if (decorator.getDecoratedTypes() == null) { throw BeanLogger.LOG.decoratorMethodReturnsNull("getDecoratedTypes", decorator); } }
private void validateDecorator(Decorator<?> decorator) { Set<Annotation> qualifiers = decorator.getDelegateQualifiers(); if (decorator.getDelegateType() == null) { throw BeanLogger.LOG.decoratorMethodReturnsNull("getDelegateType", decorator); } Bindings.validateQualifiers(qualifiers, getBeanManager(), decorator, "Decorator.getDelegateQualifiers"); if (decorator.getDecoratedTypes() == null) { throw BeanLogger.LOG.decoratorMethodReturnsNull("getDecoratedTypes", decorator); } }
private void validateDecorator(Decorator<?> decorator) { Set<Annotation> qualifiers = decorator.getDelegateQualifiers(); if (decorator.getDelegateType() == null) { throw BeanLogger.LOG.decoratorMethodReturnsNull("getDelegateType", decorator); } Bindings.validateQualifiers(qualifiers, getBeanManager(), decorator, "Decorator.getDelegateQualifiers"); if (decorator.getDecoratedTypes() == null) { throw BeanLogger.LOG.decoratorMethodReturnsNull("getDecoratedTypes", decorator); } }
private void validateDecorator(Decorator<?> decorator) { Set<Annotation> qualifiers = decorator.getDelegateQualifiers(); if (decorator.getDelegateType() == null) { throw BeanLogger.LOG.decoratorMethodReturnsNull("getDelegateType", decorator); } Bindings.validateQualifiers(qualifiers, getBeanManager(), decorator, "Decorator.getDelegateQualifiers"); if (decorator.getDecoratedTypes() == null) { throw BeanLogger.LOG.decoratorMethodReturnsNull("getDecoratedTypes", decorator); } }
private void validateDecorator(Decorator<?> decorator) { Set<Annotation> qualifiers = decorator.getDelegateQualifiers(); if (decorator.getDelegateType() == null) { throw BeanLogger.LOG.decoratorMethodReturnsNull("getDelegateType", decorator); } Bindings.validateQualifiers(qualifiers, getBeanManager(), decorator, "Decorator.getDelegateQualifiers"); if (decorator.getDecoratedTypes() == null) { throw BeanLogger.LOG.decoratorMethodReturnsNull("getDecoratedTypes", decorator); } }
private void validateDecorator(Decorator<?> decorator) { Set<Annotation> qualifiers = decorator.getDelegateQualifiers(); if (decorator.getDelegateType() == null) { throw BeanLogger.LOG.decoratorMethodReturnsNull("getDelegateType", decorator); } Bindings.validateQualifiers(qualifiers, getBeanManager(), decorator, "Decorator.getDelegateQualifiers"); if (decorator.getDecoratedTypes() == null) { throw BeanLogger.LOG.decoratorMethodReturnsNull("getDecoratedTypes", decorator); } }
@Override protected boolean matches(Resolvable resolvable, Decorator<?> bean) { return rules.matches(Collections.singleton(bean.getDelegateType()), resolvable.getTypes()) && Beans.containsAllQualifiers(QualifierInstance.of(bean.getDelegateQualifiers(), getStore()), resolvable.getQualifiers()) && getBeanManager().getEnabled().isDecoratorEnabled(bean.getBeanClass()); }
@Override protected boolean matches(Resolvable resolvable, Decorator<?> bean) { return rules.matches(Collections.singleton(bean.getDelegateType()), resolvable.getTypes()) && Beans.containsAllQualifiers(QualifierInstance.of(bean.getDelegateQualifiers(), getStore()), resolvable.getQualifiers()) && getBeanManager().getEnabled().isDecoratorEnabled(bean.getBeanClass()); }
@Override protected boolean matches(Resolvable resolvable, Decorator<?> bean) { return rules.matches(Collections.singleton(bean.getDelegateType()), resolvable.getTypes()) && Beans.containsAllQualifiers(QualifierInstance.of(bean.getDelegateQualifiers(), getStore()), resolvable.getQualifiers()) && getBeanManager().getEnabled().isDecoratorEnabled(bean.getBeanClass()); }
@Override protected boolean matches(Resolvable resolvable, Decorator<?> bean) { return rules.matches(Collections.singleton(bean.getDelegateType()), resolvable.getTypes()) && Beans.containsAllQualifiers(QualifierInstance.of(bean.getDelegateQualifiers(), getStore()), resolvable.getQualifiers()) && getBeanManager().getEnabled().isDecoratorEnabled(bean.getBeanClass()); }
@Override protected boolean matches(Resolvable resolvable, Decorator<?> bean) { return rules.matches(Collections.singleton(bean.getDelegateType()), resolvable.getTypes()) && Beans.containsAllQualifiers(QualifierInstance.of(bean.getDelegateQualifiers(), getStore()), resolvable.getQualifiers()) && getBeanManager().getEnabled().isDecoratorEnabled(bean.getBeanClass()); }
@Override protected boolean matches(Resolvable resolvable, Decorator<?> bean) { return rules.matches(Collections.singleton(bean.getDelegateType()), resolvable.getTypes()) && Beans.containsAllQualifiers(QualifierInstance.of(bean.getDelegateQualifiers(), getStore()), resolvable.getQualifiers()) && getBeanManager().getEnabled().isDecoratorEnabled(bean.getBeanClass()); }