Package ca.simplegames.micro.controllers

Examples of ca.simplegames.micro.controllers.ControllerWrapper


                    // StringUtils.isNotBlank too heavy for this crowded space ... sorry Commons::Lang
                    if (controllerName != null && !controllerName.isEmpty()) {
                        if (wrapperName != null && !wrapperName.isEmpty()) {
                            try {
                                ControllerWrapper controller =
                                        (ControllerWrapper) ClassUtilities.loadClass(wrapperName).newInstance();
                                Class[] paramTypes = {String.class, MicroContext.class, Map.class};
                                Object[] params = {controllerName, context, (Map) controllerMap.get(Globals.OPTIONS)};
                                Method method = controller.getClass()
                                        .getDeclaredMethod(ControllerManager.EXECUTE_METHOD, paramTypes);
                                method.invoke(controller, params);
                            } catch (Exception e) {
                                repository.getLog().error(String.format("%s, error: %s", controllerName, e.getMessage()));
                                e.printStackTrace();
View Full Code Here

TOP

Related Classes of ca.simplegames.micro.controllers.ControllerWrapper

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.