Examples of DefinitionException


Examples of org.apache.webbeans.exception.inject.DefinitionException

        if(hasName)
        {
            if(AnnotationUtil.hasMethodAnnotation(method, Named.class))
            {
                throw new DefinitionException("Specialized method : " + method.getName() + " in class : "
                        + component.getReturnType().getName() + " may not define @Named annotation");
            }

            component.setName(name);
        }
View Full Code Here

Examples of org.apache.webbeans.exception.inject.DefinitionException

                if (clazz != null)
                {
                    if (found)
                    {
                        throw new DefinitionException(log.getTokenString(OWBLogConst.EXCEPT_0014) + clazz.getName());
                    }
                    else
                    {
                        foundClazz = clazz;
                        found = true;
View Full Code Here

Examples of org.apache.webbeans.exception.inject.DefinitionException

        if(id != null)
        {
            Bean<?> oldBean = passivationBeans.putIfAbsent(id, bean);
            if (oldBean != null)
            {
                throw new DefinitionException("PassivationCapable bean id is not unique: " + id + " bean:" + bean);
            }
           
        }       
    }
View Full Code Here

Examples of org.apache.webbeans.exception.inject.DefinitionException

                }

                //Check types of the beans
                if(comp.getClass() != superBean.getClass())
                {
                    throw new DefinitionException("@Specialized Class : " + specializedClass.getName()
                            + " and its super class may be the same type of bean,i.e, ManagedBean, SessionBean etc.");
                }

                if(superBean.getName() != null)
                {
                    if(comp.getName() != null)
                    {
                        throw new DefinitionException("@Specialized Class : " + specializedClass.getName()
                                + " may not explicitly declare a bean name");
                    }

                    comp.setName(superBean.getName());
                    comp.setSpecializedBean(true);
View Full Code Here

Examples of org.apache.webbeans.exception.inject.DefinitionException

        if(hasName)
        {
            if(AnnotationUtil.hasMethodAnnotation(method, Named.class))
            {
                throw new DefinitionException("Specialized method : " + method.getName() + " in class : "
                        + component.getReturnType().getName() + " may not define @Named annotation");
            }

            component.setName(name);
        }
View Full Code Here

Examples of org.apache.webbeans.exception.inject.DefinitionException

               
                if(superBean.getName() != null)
                {
                    if(comp.getName() != null)
                    {
                        throw new DefinitionException("@Specialized Class : " + specializedClass.getName() + " may not explicitly declare a bean name");
                    }                   
                   
                    comp.setName(superBean.getName());
                    comp.setSpecializedBean(true);
                }
View Full Code Here

Examples of org.apache.webbeans.exception.inject.DefinitionException

       
        if(hasName)
        {
            if(AnnotationUtil.hasMethodAnnotation(method, Named.class))
            {
                throw new DefinitionException("Specialized method : " + method.getName() + " in class : " + component.getReturnType().getName() + " may not define @Named annotation");
            }
           
            component.setName(name);
        }
       
View Full Code Here

Examples of org.apache.webbeans.exception.inject.DefinitionException

        if(id != null)
        {
            Bean<?> oldBean = passivationBeans.putIfAbsent(id, bean);
            if (oldBean != null)
            {
                throw new DefinitionException("PassivationCapable bean id is not unique: " + id + " bean:" + bean);
            }
           
        }       
    }
View Full Code Here

Examples of org.apache.webbeans.exception.inject.DefinitionException

               
                if(clazz != null)
                {
                   if(found)
                   {
                       throw new DefinitionException(log.getTokenString(OWBLogConst.EXCEPT_0014) + clazz.getName());
                   }
                   else
                   {
                       foundClazz = clazz;
                       found = true;
View Full Code Here

Examples of org.codehaus.aspectwerkz.exception.DefinitionException

     * @param name the name of the parameter
     * @return the value of the parameter
     */
    public String getParameter(final String name) {
        if (!m_parameters.containsKey(name)) {
            throw new DefinitionException("parameter to advice not specified: " + name);
        }
        return (String)m_parameters.get(name);
    }
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.