Package org.jboss.weld.resolution

Examples of org.jboss.weld.resolution.Resolvable


    private InstanceImpl(InjectionPoint injectionPoint, CreationalContext<? super T> creationalContext, BeanManagerImpl beanManager) {
        super(injectionPoint, creationalContext, beanManager);

        // Perform typesafe resolution, and possibly attempt to resolve the ambiguity
        Resolvable resolvable = new ResolvableBuilder(getType(), getBeanManager()).addQualifiers(getQualifiers())
                .setDeclaringBean(getInjectionPoint().getBean()).create();
        TypeSafeBeanResolver beanResolver = getBeanManager().getBeanResolver();
        this.beans = beanResolver.resolve(beanResolver.resolve(resolvable, Reflections.isCacheable(getQualifiers())));
    }
View Full Code Here


        return Beans.isBeanEnabled(bean, getEnabled());
    }

    @Override
    public Set<Bean<?>> getBeans(Type beanType, Annotation... qualifiers) {
        Resolvable resolvable = new ResolvableBuilder(beanType, this).addQualifiers(qualifiers).create();
        return beanResolver.resolve(resolvable, isCacheable(qualifiers));
    }
View Full Code Here

     */
    @Override
    public void fireEvent(Object event, Annotation... qualifiers) {
        Preconditions.checkArgumentNotNull(event, "event");
        Type eventType = Types.getCanonicalType(event.getClass());
        Resolvable resolvable = globalStrictObserverNotifier.buildEventResolvable(eventType, qualifiers);
        EventPacket<?> packet = EventPacket.of(event, qualifiers);
        globalStrictObserverNotifier.fireEvent(resolvable, packet);
    }
View Full Code Here

    /**
     * Fires a {@link ProcessAnnotatedType} or {@link ProcessSyntheticAnnotatedType} using the default event mechanism.
     */
    private void fireProcessAnnotatedType(ProcessAnnotatedTypeImpl<?> event, BeanManagerImpl beanManager) {
        final Resolvable resolvable = ProcessAnnotatedTypeEventResolvable.of(event, discovery);
        try {
            beanManager.getGlobalLenientObserverNotifier().fireEvent(event, resolvable);
        } catch (Exception e) {
            throw new DefinitionException(e);
        }
View Full Code Here

            Assert.fail("Resolved observer mismatch for " + javaClass + ". Expected but not resolved: " + notResolved + ". Resolved but not expected: " + notExpected);
        }
    }

    private <T> List<ObserverMethod<? super T>> resolve(Class<?> javaClass) {
        Resolvable resolvable = ProcessAnnotatedTypeEventResolvable.forProcessAnnotatedType(transformer.getBackedAnnotatedType(javaClass, "foo"), discovery);
        return notifier.<T>resolveObserverMethods(resolvable);
    }
View Full Code Here

TOP

Related Classes of org.jboss.weld.resolution.Resolvable

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.