Package org.jboss.aesh.cl

Examples of org.jboss.aesh.cl.GroupCommandDefinition


                return new AeshCommandContainer(
                        new CommandLineParserBuilder()
                                .processedCommand(processedCommand)
                                .create());
        }
        GroupCommandDefinition groupCommand = (GroupCommandDefinition) clazz.getAnnotation(GroupCommandDefinition.class);
        if(groupCommand != null) {
            ProcessedCommand processedGroupCommand = new ProcessedCommandBuilder()
                    .name(groupCommand.name())
                    .description(groupCommand.description())
                    .validator(groupCommand.validator())
                    .resultHandler(groupCommand.resultHandler())
                    .create();

            AeshCommandContainer groupContainer;
            if(clazzIsaCommand)
                groupContainer = new AeshCommandContainer(
                        new CommandLineParserBuilder()
                                .processedCommand(processedGroupCommand)
                                .command((Command) commandObject)
                                .create());
            else
                groupContainer = new AeshCommandContainer(
                        new CommandLineParserBuilder()
                                .processedCommand(processedGroupCommand)
                                .create());

            for(Class groupClazz : groupCommand.groupCommands()) {
                Object groupInstance = ReflectionUtil.newInstance(groupClazz);
                if(groupInstance instanceof Command)
                    groupContainer.addChild(ParserGenerator.doGenerateCommandLineParser(
                            groupInstance, true, true));
                else
View Full Code Here

TOP

Related Classes of org.jboss.aesh.cl.GroupCommandDefinition

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.