Package org.apache.webbeans.exception.helper

Examples of org.apache.webbeans.exception.helper.ViolationMessageBuilder.addLine()


                        {
                            int modifiers = m.getModifiers();
                            if (ClassUtil.isFinal(modifiers) && !Modifier.isPrivate(modifiers) &&
                                !m.isSynthetic() && !m.isBridge())
                            {
                                violationMessage.addLine(beanClass.getName(), " has final method "+ m + " CDI doesn't allow that.");
                            }
                        }

                        Constructor<?> cons = getNoArgConstructor(beanClass);
                        if (cons == null)
View Full Code Here


                        }

                        Constructor<?> cons = getNoArgConstructor(beanClass);
                        if (cons == null)
                        {
                            violationMessage.addLine(beanClass.getName(), " has no explicit no-arg constructor!",
                                    "A public or protected constructor without args is required!");
                        }
                        else if (Modifier.isPrivate(cons.getModifiers()))
                        {
                            violationMessage.addLine(beanClass.getName(), " has a >private< no-arg constructor! CDI doesn't allow that.");
View Full Code Here

                            violationMessage.addLine(beanClass.getName(), " has no explicit no-arg constructor!",
                                    "A public or protected constructor without args is required!");
                        }
                        else if (Modifier.isPrivate(cons.getModifiers()))
                        {
                            violationMessage.addLine(beanClass.getName(), " has a >private< no-arg constructor! CDI doesn't allow that.");
                        }
                    }

                    //Throw Exception
                    if(violationMessage.containsViolation())
View Full Code Here

                if(!beanClass.isInterface() && beanClass != Object.class)
                {
                    if(beanClass.isPrimitive())
                    {
                        violationMessage.addLine("It isn't possible to use a primitive type (" + beanClass.getName(), ")");
                    }

                    if(ClassUtil.isArray(beanClass))
                    {
                        violationMessage.addLine("It isn't possible to use an array type (", beanClass.getName(), ")");
View Full Code Here

                        violationMessage.addLine("It isn't possible to use a primitive type (" + beanClass.getName(), ")");
                    }

                    if(ClassUtil.isArray(beanClass))
                    {
                        violationMessage.addLine("It isn't possible to use an array type (", beanClass.getName(), ")");
                    }

                    if(!violationMessage.containsViolation())
                    {
                        if (ClassUtil.isFinal(beanClass.getModifiers()))
View Full Code Here

                    if(!violationMessage.containsViolation())
                    {
                        if (ClassUtil.isFinal(beanClass.getModifiers()))
                        {
                            violationMessage.addLine(beanClass.getName(), " is a final class! CDI doesn't allow that.");
                        }

                        Method[] methods = SecurityUtil.doPrivilegedGetDeclaredMethods(beanClass);
                        for (Method m : methods)
                        {
View Full Code Here

                        {
                            int modifiers = m.getModifiers();
                            if (ClassUtil.isFinal(modifiers) && !Modifier.isPrivate(modifiers) &&
                                !m.isSynthetic() && !m.isBridge())
                            {
                                violationMessage.addLine(beanClass.getName(), " has final method "+ m + " CDI doesn't allow that.");
                            }
                        }

                        Constructor<?> cons = getNoArgConstructor(beanClass);
                        if (cons == null)
View Full Code Here

                        }

                        Constructor<?> cons = getNoArgConstructor(beanClass);
                        if (cons == null)
                        {
                            violationMessage.addLine(beanClass.getName(), " has no explicit no-arg constructor!",
                                    "A public or protected constructor without args is required!");
                        }
                        else if (Modifier.isPrivate(cons.getModifiers()))
                        {
                            violationMessage.addLine(beanClass.getName(), " has a >private< no-arg constructor! CDI doesn't allow that.");
View Full Code Here

                            violationMessage.addLine(beanClass.getName(), " has no explicit no-arg constructor!",
                                    "A public or protected constructor without args is required!");
                        }
                        else if (Modifier.isPrivate(cons.getModifiers()))
                        {
                            violationMessage.addLine(beanClass.getName(), " has a >private< no-arg constructor! CDI doesn't allow that.");
                        }
                    }

                    //Throw Exception
                    if(violationMessage.containsViolation())
View Full Code Here

                if(!beanClass.isInterface() && beanClass != Object.class)
                {
                    if(beanClass.isPrimitive())
                    {
                        violationMessage.addLine("It isn't possible to use a primitive type (" + beanClass.getName(), ")");
                    }

                    if(ClassUtil.isArray(beanClass))
                    {
                        violationMessage.addLine("It isn't possible to use an array type (", beanClass.getName(), ")");
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.