Examples of GuiceInjection


Examples of org.moresbycoffee.mbyhave8.guice.annotations.GuiceInjection

        return (T) testInstance;
    }

    @SuppressWarnings("unchecked")
    private <T extends MByHaveSpec> List<Module> getUserModules(final Class<T> testClass) {
        final GuiceInjection guiceAnnotation = testClass.getAnnotation(GuiceInjection.class);
        final Class<? extends Module>[] userModuleClasses = guiceAnnotation == null ? null : guiceAnnotation.value();

        return Arrays.asList(userModuleClasses == null ? new Class[]{} : userModuleClasses).stream().map(userModuleClass -> {
            try {
                return (Module) userModuleClass.getConstructor().newInstance();
            } catch (NoSuchMethodException | InvocationTargetException | IllegalAccessException | InstantiationException e) {
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.