Package org.jboss.weld.exceptions

Examples of org.jboss.weld.exceptions.UnproxyableResolutionException


    private static UnproxyableResolutionException getUnproxyableTypesExceptionInt(Iterable<? extends Type> types, Bean<?> declaringBean, ServiceRegistry services) {
        for (Type apiType : types) {
            if (Object.class.equals(apiType)) {
                continue;
            }
            UnproxyableResolutionException e = getUnproxyableTypeException(apiType, declaringBean, services);
            if (e != null) {
                return e;
            }
        }
        return null;
View Full Code Here


        if (constructor == null) {
            return ValidatorLogger.LOG.notProxyableNoConstructor(clazz, getDeclaringBeanInfo(declaringBean));
        } else if (Modifier.isPrivate(constructor.getModifiers())) {
            InstantiatorFactory factory = services.get(InstantiatorFactory.class);
            if (factory == null || !(factory.useInstantiators())) {
                return new UnproxyableResolutionException(ValidatorLogger.LOG.notProxyablePrivateConstructor(clazz, constructor, getDeclaringBeanInfo(declaringBean)));
            } else {
                return null;
            }
        } else if (Reflections.isTypeOrAnyMethodFinal(clazz)) {
            return ValidatorLogger.LOG.notProxyableFinalTypeOrMethod(clazz, Reflections.getNonPrivateFinalMethodOrType(clazz), getDeclaringBeanInfo(declaringBean));
View Full Code Here

        /*
         * Named beans are validated eagerly. If a bean is not named, it is validated for proxyability based on discovered
         * injection points.
         */
        if (normalScoped && bean.getName() != null && !Beans.isBeanProxyable(bean, beanManager)) {
            UnproxyableResolutionException ue = Proxies.getUnproxyableTypesException(bean, beanManager.getServices());
            if (ue != null) {
                throw new DeploymentException(ue);
            }
        }

View Full Code Here

        }
        // Account for the case this is disabled decorator
        if (!resolvedBeans.isEmpty()) {
            Bean<?> resolvedBean = (Bean<?>) resolvedBeans.iterator().next();
            if (beanManager.isNormalScope(resolvedBean.getScope())) {
                UnproxyableResolutionException ue = Proxies.getUnproxyableTypeException(ij.getType(), resolvedBean, beanManager.getServices());
                if (ue != null) {
                    throw ValidatorLogger.LOG.injectionPointHasNonProxyableDependencies(ij, ue);
                }
            }
            if (bean != null && Beans.isPassivatingScope(bean, beanManager)) {
View Full Code Here

TOP

Related Classes of org.jboss.weld.exceptions.UnproxyableResolutionException

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.