Package org.apache.webbeans.exception.definition

Examples of org.apache.webbeans.exception.definition.NonexistentTypeException


        {
            Class<?> clazz = XMLUtil.getElementJavaType(childElement);

            if (clazz == null)
            {
                throw new NonexistentTypeException(errorMessage + "Class with name : " + XMLUtil.getElementJavaClassName(childElement) + " is not found for Array element type");
            }

            if (clazz.isAnnotation())
            {
                anns.add(getXMLDefinedAnnotationMember(childElement, (Class<? extends Annotation>) clazz, errorMessage));
View Full Code Here


        {
            Class<?> clazz = XMLUtil.getElementJavaType(childElement);

            if (clazz == null)
            {
                throw new NonexistentTypeException(errorMessage + "Class with name : " + XMLUtil.getElementJavaClassName(childElement) + " is not found for Array element type");
            }

            if (clazz.isAnnotation())
            {
                anns.add(getXMLDefinedAnnotationMember(childElement, (Class<? extends Annotation>) clazz, errorMessage));
View Full Code Here

            for (Element child : childs)
            {
                Class<?> clazz = XMLUtil.getElementJavaType(child);
                if (clazz == null)
                {
                    throw new NonexistentTypeException(errorMessage + "Type is not exist with class name : " + XMLUtil.getElementJavaClassName(child) + " in namespace : " + XMLUtil.getElementNameSpace(child) );
                }

                Class<? extends Annotation> annClazz = null;
                if (!clazz.isAnnotation())
                {
View Full Code Here

                    else
                    {
                        type = (Class<T>) XMLUtil.getElementJavaType(producesElementChild);
                        if (type == null)
                        {
                            throw new NonexistentTypeException(errorMessage + "Java type : " + XMLUtil.getElementJavaClassName(producesElementChild) + " does not exist in the <Produces> element child");
                        }

                        else if (type.isAnnotation())
                        {
                            memberLevelMetaData.add((Class<? extends Annotation>) type);
View Full Code Here

    private void addNewBindingType(Element bindingTypeElement)
    {
        Class<?> clazz = XMLUtil.getElementJavaType(bindingTypeElement);
        if (clazz == null)
        {
            throw new NonexistentTypeException(createConfigurationFailedMessage() + "Binding type with given class : " + bindingTypeElement.getName() + " not found");
        }

        Class<? extends Annotation> clazzAnnot = null;
        if (!clazz.isAnnotation())
        {
View Full Code Here

    private void addNewInterceptorBindingType(Element interceptorBindingTypeElement)
    {
        Class<?> clazz = XMLUtil.getElementJavaType(interceptorBindingTypeElement);
        if (clazz == null)
        {
            throw new NonexistentTypeException(createConfigurationFailedMessage() + "InterceptorBinding type with given class : " + interceptorBindingTypeElement.getName() + " not found");
        }

        Class<? extends Annotation> clazzAnnot = null;
        if (!clazz.isAnnotation())
        {
            throw new WebBeansConfigurationException(createConfigurationFailedMessage() + "InterceptorBinding type with given class : " + interceptorBindingTypeElement.getName() + " is not an annotation type");
        }
        else
        {
            clazzAnnot = (Class<? extends Annotation>) clazz;
        }

        if (xmlAnnotTypeManager.isInterceptorBindingTypeExist(clazzAnnot))
        {
            throw new DeploymentException(createConfigurationFailedMessage() + "InterceptorBinding type with given class : " + interceptorBindingTypeElement.getName() + " is already defined in the XML");
        }

        List<Element> childs = interceptorBindingTypeElement.elements();
        for (Element child : childs)
        {
            Class<?> clz = XMLUtil.getElementJavaType(child);
            if (clz == null)
            {
                throw new NonexistentTypeException(createConfigurationFailedMessage() + "InterceptorBinding type with given class : " + XMLUtil.getElementJavaClassName(child) + " not found " + "in namespace : " + XMLUtil.getElementNameSpace(child));
            }

            if (!clz.isAnnotation() || !AnnotationUtil.isInterceptorBindingAnnotation((Class<? extends Annotation>) clz))
            {
                throw new WebBeansConfigurationException(createConfigurationFailedMessage() + "InterceptorBinding type with given class : " + XMLUtil.getElementJavaClassName(child) + " is not interceptor binding annotation type");
View Full Code Here

    private void addNewStereoTypeType(Element stereoTypeElement)
    {
        Class<?> clazz = XMLUtil.getElementJavaType(stereoTypeElement);
        if (clazz == null)
        {
            throw new NonexistentTypeException(createConfigurationFailedMessage() + "Stereotype with given class : " + stereoTypeElement.getName() + " not found");
        }

        Class<? extends Annotation> clazzAnnot = null;
        if (!clazz.isAnnotation())
        {
View Full Code Here

    {
        Class<?> clazz = XMLUtil.getElementJavaType(webBeanElement);

        if (clazz == null)
        {
            throw new NonexistentTypeException(createConfigurationFailedMessage() + "Class with name : " + XMLUtil.getName(webBeanElement) + " is not found in namespace " + XMLUtil.getElementNameSpace(webBeanElement));
        }

        boolean ok = false;

        /* Enterprise WebBean */
 
View Full Code Here

            final String moreThanOneChildTypeErrorMesg = createConfigurationFailedMessage() + XMLUtil.getName(methodChild) + "method declaration can not contain more than one <Initializer>, <Destructor>, <Produces>, <Disposes> or <Observes> element";

            if (childClazz == null)
            {
                throw new NonexistentTypeException(createConfigurationFailedMessage() + "Direct child element of method : " + XMLUtil.getName(methodChild) + " does not corresponds to any Java type");
            }
            else
            {
                if (childClazz.isAnnotation())
                {
View Full Code Here

            }
            child = (Element)node;
            Class<?> clazz = XMLUtil.getElementJavaType(child);
            if (clazz == null)
            {
                throw new NonexistentTypeException(errorMessage + "Type is not exist with class name : " + XMLUtil.getElementJavaClassName(child)
                                                   + " in namespace : " + XMLUtil.getElementNameSpace(child) );
            }

            Class<? extends Annotation> annClazz = null;
            if (!clazz.isAnnotation())
View Full Code Here

TOP

Related Classes of org.apache.webbeans.exception.definition.NonexistentTypeException

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.