Examples of AeshCommandContainer


Examples of org.jboss.aesh.console.command.AeshCommandContainer

      }
      try
      {
         CommandLineParser parser = cmd.getParser(shellContext, completeLine == null ? name : completeLine);
         CommandAdapter command = new CommandAdapter(shell, cmd);
         return new AeshCommandContainer(parser, command);
      }
      catch (Exception e)
      {
         throw new RuntimeException("Error while creating parser: " + e.getMessage(), e);
      }
View Full Code Here

Examples of org.jboss.aesh.console.command.container.AeshCommandContainer

        return this;
    }

    public AeshCommandRegistryBuilder command(ProcessedCommand processedCommand,
            Class<? extends Command> command) {
        commandRegistry.addCommand(new AeshCommandContainer(processedCommand, command));
        return this;
    }
View Full Code Here

Examples of org.jboss.aesh.console.command.container.AeshCommandContainer

        return this;
    }

    public AeshCommandRegistryBuilder command(ProcessedCommand processedCommand,
            Command command) {
        commandRegistry.addCommand(new AeshCommandContainer(processedCommand, command));
        return this;
    }
View Full Code Here

Examples of org.jboss.aesh.console.command.container.AeshCommandContainer

        return this;
    }

     public AeshCommandRegistryBuilder command(CommandLineParser parser,
            Class<? extends Command> command) {
        commandRegistry.addCommand(new AeshCommandContainer(parser, command));
        return this;
    }
View Full Code Here

Examples of org.jboss.aesh.console.command.container.AeshCommandContainer

        return this;
    }

    public AeshCommandRegistryBuilder command(CommandLineParser parser,
            Command command) {
        commandRegistry.addCommand(new AeshCommandContainer(parser, command));
        return this;
    }
View Full Code Here

Examples of org.jboss.aesh.console.command.container.AeshCommandContainer

      }
      try
      {
         CommandLineParser parser = cmd.getParser(shellContext, completeLine == null ? name : completeLine);
         CommandAdapter command = new CommandAdapter(shell, cmd);
         return new AeshCommandContainer(parser, command);
      }
      catch (Exception e)
      {
         throw new RuntimeException("Error while creating parser: " + e.getMessage(), e);
      }
View Full Code Here

Examples of org.jboss.aesh.console.command.container.AeshCommandContainer

        return this;
    }

    public AeshCommandRegistryBuilder command(ProcessedCommand processedCommand,
            Class<? extends Command> command) {
        commandRegistry.addCommand(new AeshCommandContainer(processedCommand,
                ReflectionUtil.newInstance(command)));
        return this;
    }
View Full Code Here

Examples of org.jboss.aesh.console.command.container.AeshCommandContainer

        return this;
    }

    public AeshCommandRegistryBuilder command(ProcessedCommand processedCommand,
            Command command) {
        commandRegistry.addCommand(new AeshCommandContainer(processedCommand, command));
        return this;
    }
View Full Code Here

Examples of org.jboss.aesh.console.command.container.AeshCommandContainer

        return this;
    }


    public AeshCommandRegistryBuilder command(CommandLineParser parser) {
        commandRegistry.addCommand(new AeshCommandContainer(parser));
        return this;
    }
View Full Code Here

Examples of org.jboss.aesh.console.command.container.AeshCommandContainer

                    .resultHandler(command.resultHandler()).create();

            processCommand(processedCommand, clazz);

            if(clazzIsaCommand)
                return new AeshCommandContainer(
                        new CommandLineParserBuilder()
                                .processedCommand(processedCommand)
                                .command((Command) commandObject)
                                .create());
            else
                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
                    groupContainer.addChild(ParserGenerator.doGenerateCommandLineParser(
                            groupInstance, false, true));
            }

            return groupContainer;
        }
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.