Package com.mycila.testing.plugins.jetty

Examples of com.mycila.testing.plugins.jetty.JettyRunWar


        if (!hasJettyPlugin(method)) {
            throw new IllegalArgumentException("at least " + method.getDeclaringClass() + " should be annotated with "
                    + JettyRunWar.class);
        }
       
        final JettyRunWar methodAnno = method.getAnnotation(JettyRunWar.class);
        final boolean isMethodDefaultConfig = DefaultConfig.DEFAULT_CONFIG_CLASS.equals((methodAnno == null)
                ? null
                : methodAnno.value());
       
        final JettyRunWar classAnno = method.getDeclaringClass().getAnnotation(JettyRunWar.class);
        final boolean isClassDefaultConfig = DefaultConfig.DEFAULT_CONFIG_CLASS.equals((classAnno == null)
                ? null
                : classAnno.value());
       
        if (isClassDefaultConfig && isMethodDefaultConfig) {
            throw new IllegalArgumentException(method + " should not be annotated with " + JettyRunWar.class
                    + " because it has the same configuration has its class " + method.getDeclaringClass());
        }
        if (!isClassDefaultConfig && isMethodDefaultConfig) {
            throw new IllegalArgumentException(method + " must be annotated with " + JettyRunWar.class
                    + " and has a custom configuration because its class " + method.getDeclaringClass()
                    + " has a custom configuration");
        }
       
        final JettyRunWar sourceConfig = firstNonNull(methodAnno, classAnno);
       
        return configFrom(sourceConfig, method, method.getDeclaringClass());
    }
View Full Code Here


    {
        if (!hasJettyPlugin(klass)) {
            throw new IllegalArgumentException("at least " + klass + " should be annotated with " + JettyRunWar.class);
        }
       
        final JettyRunWar classAnno = klass.getAnnotation(JettyRunWar.class);
       
        return configFrom(classAnno, null, klass);
    }
View Full Code Here

        if (!hasJettyPlugin(method)) {
            throw new IllegalArgumentException("at least " + method.getDeclaringClass() + " should be annotated with "
                    + JettyRunWar.class);
        }
       
        final JettyRunWar methodAnno = method.getAnnotation(JettyRunWar.class);
        final boolean isMethodDefaultConfig = DefaultConfig.DEFAULT_CONFIG_CLASS.equals((methodAnno == null)
                ? null
                : methodAnno.value());
       
        final JettyRunWar classAnno = method.getDeclaringClass().getAnnotation(JettyRunWar.class);
        final boolean isClassDefaultConfig = DefaultConfig.DEFAULT_CONFIG_CLASS.equals((classAnno == null)
                ? null
                : classAnno.value());
       
        if (isClassDefaultConfig && isMethodDefaultConfig) {
            throw new IllegalArgumentException(method + " should not be annotated with " + JettyRunWar.class
                    + " because it has the same configuration has its class " + method.getDeclaringClass());
        }
        if (!isClassDefaultConfig && isMethodDefaultConfig) {
            throw new IllegalArgumentException(method + " must be annotated with " + JettyRunWar.class
                    + " and has a custom configuration because its class " + method.getDeclaringClass()
                    + " has a custom configuration");
        }
       
        final JettyRunWar sourceConfig = firstNonNull(methodAnno, classAnno);
       
        return configFrom(sourceConfig, method, method.getDeclaringClass());
    }
View Full Code Here

    {
        if (!hasJettyPlugin(klass)) {
            throw new IllegalArgumentException("at least " + klass + " should be annotated with " + JettyRunWar.class);
        }
       
        final JettyRunWar classAnno = klass.getAnnotation(JettyRunWar.class);
       
        return configFrom(classAnno, null, klass);
    }
View Full Code Here

TOP

Related Classes of com.mycila.testing.plugins.jetty.JettyRunWar

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.