Package javax.enterprise.inject.spi

Examples of javax.enterprise.inject.spi.DefinitionException


        {
            Type[] types = ClassUtil.getActualTypeArguments(injectionPoint.getType());
            if (types.length != 1 ||
                    !((javax.enterprise.inject.spi.Decorator) bean).getDecoratedTypes().contains(types[0]))
            {
                throw new DefinitionException("ParametrizedType must be a DecoratedType");
            }
        }
        else
        {
            throw new DefinitionException(injectionPoint.getBean().getBeanClass() + " must be a Decorator");
        }
    }
View Full Code Here


            if (types.length != 1 ||
                    !ClassUtil.isWildCardType(types[0]) ||
                    ((WildcardType) types[0]).getLowerBounds().length > 0 ||
                    !(((WildcardType) types[0]).getUpperBounds().length == 1 && Object.class.equals(((WildcardType) types[0]).getUpperBounds()[0])))
            {
                throw new DefinitionException("Type parameter for interceptor " + bean.getBeanClass() + " must be an unbound wildcard");
            }
        }
        else
        {
            throw new DefinitionException(bean.getBeanClass() + " must be an Interceptor");
        }
    }
View Full Code Here

    private <T> BeanAttributes<T> updateBeanAttributesIfNeeded(BeanAttributes<T> beanAttributes, ProcessBeanAttributesImpl event)
    {
        if (event.getDefinitionError() != null)
        {
            throw new DefinitionException(event.getDefinitionError());
        }
        if (event.getAttributes() != beanAttributes)
        {
            beanAttributes = event.getAttributes();
            if (!webBeansContext.getBeanManagerImpl().isScope(beanAttributes.getScope()))
            {
                throw new DefinitionException(beanAttributes.getScope() + " is not a scope");
            }
        }
        return beanAttributes;
    }
View Full Code Here

        {
            webBeansContext.getBeanManagerImpl().fireEvent(event, true, AnnotationUtil.EMPTY_ANNOTATION_ARRAY);
        }
        catch (final Exception e)
        {
            throw new DefinitionException("event ProcessBeanAttributes thrown an exception for " + annotatedType, e);
        }
        return event;
    }
View Full Code Here

TOP

Related Classes of javax.enterprise.inject.spi.DefinitionException

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.