Examples of UnproxyableResolutionException


Examples of javax.enterprise.inject.UnproxyableResolutionException

            if (ClassUtil.isPrimitive(superClass) || ClassUtil.isArray(superClass) || ClassUtil.isFinal(superClass.getModifiers()) || ClassUtil.hasFinalMethod(superClass) || (cons == null || ClassUtil.isPrivate(cons.getModifiers())))
            {
                if (scopeType.isAnnotationPresent(NormalScope.class))
                {
                    throw new UnproxyableResolutionException("WebBeans with api type with normal scope must be proxiable to inject, but class : " + superClass.getName() + " is not proxiable type");
                }
            }

        }
View Full Code Here

Examples of javax.enterprise.inject.UnproxyableResolutionException

        // finally, we create a new contextual instance
        webbeansInstance = webbeansContext.get((Contextual<Object>) bean, getContextualCreationalContext());

        if (webbeansInstance == null)
        {
            throw new UnproxyableResolutionException("Cannot find a contextual instance of bean " + bean.toString());
        }
        return webbeansInstance;
    }
View Full Code Here

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

Examples of org.jboss.weld.exceptions.UnproxyableResolutionException

        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

Examples of org.jboss.weld.exceptions.UnproxyableResolutionException

        /*
         * 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

Examples of org.jboss.weld.exceptions.UnproxyableResolutionException

        }
        // 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
Copyright © 2018 www.massapi.com. 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.