@Override public synchronized AnnotatedTypeConfigurator<T> configure() { if (annotatedType != null) { BeanManagerLogger.LOG.unableToConfigureInjectionTargetFactory(annotatedType); throw new IllegalStateException(); } if (configurator == null) { configurator = new AnnotatedTypeConfiguratorImpl<>(originalAnnotatedType); } return configurator; }
@Override public void postNotify(Extension extension) { super.postNotify(extension); if (configurator != null) { replaceAnnotatedType(configurator.complete()); configurator = null; } annotatedTypeSet = false; }
public AnnotatedTypeImpl(AnnotatedTypeConfiguratorImpl<X> configurator) { this.delegate = configurator.getAnnotated(); this.annotations = new Annotations(configurator); this.methods = configurator.getMethods().stream().map(m -> new AnnotatedMethodImpl<>(m)).collect(ImmutableSet.collector()); this.fields = configurator.getFields().stream().map(f -> new AnnotatedFieldImpl<>(f)).collect(ImmutableSet.collector()); this.constructors = configurator.getConstructors().stream().map(c -> new AnnotatedConstructorImpl<>(c)).collect(ImmutableSet.collector()); }
AnnotatedType<T> originalAT = configurator != null ? configurator.complete() : annotatedType; AnnotatedTypeConfiguratorImpl<?> newAtConfigurator = new AnnotatedTypeConfiguratorImpl<>(instanceAnnotatedType); if (newAtConfigurator.getAnnotated().isAnnotationPresent(annotation.annotationType())) { throw InterceptorLogger.LOG.interceptionFactoryAnnotationClash(originalAT, newAtConfigurator.getAnnotated(), annotation); newAtConfigurator.add(annotation); for (Annotation annotation : annMethod.getAnnotations()) { if (beanManager.isInterceptorBinding(annotation.annotationType())) { newAtConfigurator.filterMethods((m) -> if (result.getAnnotated().isAnnotationPresent(annotation.annotationType())) { throw InterceptorLogger.LOG.interceptionFactoryAnnotationClash(originalAT, newAtConfigurator.getAnnotated(), annotation); resultingAnnotatedType = (AnnotatedType<T>) newAtConfigurator.complete(); } else { resultingAnnotatedType = originalAT;
AnnotatedType<T> originalAT = configurator != null ? configurator.complete() : annotatedType; AnnotatedTypeConfiguratorImpl<?> newAtConfigurator = new AnnotatedTypeConfiguratorImpl<>(instanceAnnotatedType); if (newAtConfigurator.getAnnotated().isAnnotationPresent(annotation.annotationType())) { throw InterceptorLogger.LOG.interceptionFactoryAnnotationClash(originalAT, newAtConfigurator.getAnnotated(), annotation); newAtConfigurator.add(annotation); for (Annotation annotation : annMethod.getAnnotations()) { if (beanManager.isInterceptorBinding(annotation.annotationType())) { newAtConfigurator.filterMethods((m) -> if (result.getAnnotated().isAnnotationPresent(annotation.annotationType())) { throw InterceptorLogger.LOG.interceptionFactoryAnnotationClash(originalAT, newAtConfigurator.getAnnotated(), annotation); resultingAnnotatedType = (AnnotatedType<T>) newAtConfigurator.complete(); } else { resultingAnnotatedType = originalAT;
public AnnotatedTypeImpl(AnnotatedTypeConfiguratorImpl<X> configurator) { this.delegate = configurator.getAnnotated(); this.annotations = new Annotations(configurator); this.methods = configurator.getMethods().stream().map(m -> new AnnotatedMethodImpl<>(m)).collect(ImmutableSet.collector()); this.fields = configurator.getFields().stream().map(f -> new AnnotatedFieldImpl<>(f)).collect(ImmutableSet.collector()); this.constructors = configurator.getConstructors().stream().map(c -> new AnnotatedConstructorImpl<>(c)).collect(ImmutableSet.collector()); }
AnnotatedType<T> originalAT = configurator != null ? configurator.complete() : annotatedType; AnnotatedTypeConfiguratorImpl<?> newAtConfigurator = new AnnotatedTypeConfiguratorImpl<>(instanceAnnotatedType); if (newAtConfigurator.getAnnotated().isAnnotationPresent(annotation.annotationType())) { throw InterceptorLogger.LOG.interceptionFactoryAnnotationClash(originalAT, newAtConfigurator.getAnnotated(), annotation); newAtConfigurator.add(annotation); for (Annotation annotation : annMethod.getAnnotations()) { if (beanManager.isInterceptorBinding(annotation.annotationType())) { newAtConfigurator.filterMethods((m) -> if (result.getAnnotated().isAnnotationPresent(annotation.annotationType())) { throw InterceptorLogger.LOG.interceptionFactoryAnnotationClash(originalAT, newAtConfigurator.getAnnotated(), annotation); resultingAnnotatedType = (AnnotatedType<T>) newAtConfigurator.complete(); } else { resultingAnnotatedType = originalAT;
@Override public synchronized AnnotatedTypeConfigurator<T> configure() { if (annotatedType != null) { BeanManagerLogger.LOG.unableToConfigureInjectionTargetFactory(annotatedType); throw new IllegalStateException(); } if (configurator == null) { configurator = new AnnotatedTypeConfiguratorImpl<>(originalAnnotatedType); } return configurator; }
@Override public void postNotify(Extension extension) { super.postNotify(extension); if (configurator != null) { replaceAnnotatedType(configurator.complete()); configurator = null; } annotatedTypeSet = false; }
public AnnotatedTypeImpl(AnnotatedTypeConfiguratorImpl<X> configurator) { this.delegate = configurator.getAnnotated(); this.annotations = new Annotations(configurator); this.methods = configurator.getMethods().stream().map(m -> new AnnotatedMethodImpl<>(m)).collect(ImmutableSet.collector()); this.fields = configurator.getFields().stream().map(f -> new AnnotatedFieldImpl<>(f)).collect(ImmutableSet.collector()); this.constructors = configurator.getConstructors().stream().map(c -> new AnnotatedConstructorImpl<>(c)).collect(ImmutableSet.collector()); }
@Override public AnnotatedTypeConfigurator<T> configure() { InterceptorLogger.LOG.interceptionFactoryConfigureInvoked(annotatedType.getJavaClass().getSimpleName()); if (configurator == null) { configurator = new AnnotatedTypeConfiguratorImpl<>(annotatedType); } return configurator; }
@Override public void postNotify(Extension extension) { super.postNotify(extension); if (configurator != null) { replaceAnnotatedType(configurator.complete()); configurator = null; } annotatedTypeSet = false; }
public AnnotatedTypeImpl(AnnotatedTypeConfiguratorImpl<X> configurator) { this.delegate = configurator.getAnnotated(); this.annotations = new Annotations(configurator); this.methods = configurator.getMethods().stream().map(m -> new AnnotatedMethodImpl<>(m)).collect(ImmutableSet.collector()); this.fields = configurator.getFields().stream().map(f -> new AnnotatedFieldImpl<>(f)).collect(ImmutableSet.collector()); this.constructors = configurator.getConstructors().stream().map(c -> new AnnotatedConstructorImpl<>(c)).collect(ImmutableSet.collector()); }
@Override public AnnotatedTypeConfigurator<T> configure() { InterceptorLogger.LOG.interceptionFactoryConfigureInvoked(annotatedType.getJavaClass().getSimpleName()); if (configurator == null) { configurator = new AnnotatedTypeConfiguratorImpl<>(annotatedType); } return configurator; }
@Override public void postNotify(Extension extension) { super.postNotify(extension); if (configurator != null) { replaceAnnotatedType(configurator.complete()); configurator = null; } annotatedTypeSet = false; }
public AnnotatedTypeImpl(AnnotatedTypeConfiguratorImpl<X> configurator) { this.delegate = configurator.getAnnotated(); this.annotations = new Annotations(configurator); this.methods = configurator.getMethods().stream().map(m -> new AnnotatedMethodImpl<>(m)).collect(ImmutableSet.collector()); this.fields = configurator.getFields().stream().map(f -> new AnnotatedFieldImpl<>(f)).collect(ImmutableSet.collector()); this.constructors = configurator.getConstructors().stream().map(c -> new AnnotatedConstructorImpl<>(c)).collect(ImmutableSet.collector()); }
@Override public synchronized AnnotatedTypeConfigurator<T> configure() { if (annotatedType != null) { BeanManagerLogger.LOG.unableToConfigureInjectionTargetFactory(annotatedType); throw new IllegalStateException(); } if (configurator == null) { configurator = new AnnotatedTypeConfiguratorImpl<>(originalAnnotatedType); } return configurator; }
protected void finish() { try { for (AnnotatedTypeRegistration<?> annotatedTypeRegistration : additionalAnnotatedTypes) { addSyntheticAnnotatedType(annotatedTypeRegistration.configurator.complete(), annotatedTypeRegistration.id); } } catch (Exception e) { throw new DefinitionException(e); } }
@Override public AnnotatedTypeConfigurator<T> configure() { InterceptorLogger.LOG.interceptionFactoryConfigureInvoked(annotatedType.getJavaClass().getSimpleName()); if (configurator == null) { configurator = new AnnotatedTypeConfiguratorImpl<>(annotatedType); } return configurator; }
protected void finish() { try { for (AnnotatedTypeRegistration<?> annotatedTypeRegistration : additionalAnnotatedTypes) { addSyntheticAnnotatedType(annotatedTypeRegistration.configurator.complete(), annotatedTypeRegistration.id); } } catch (Exception e) { throw new DefinitionException(e); } }