Package org.jboss.aesh.cl

Examples of org.jboss.aesh.cl.CommandDefinition


    public static CommandLineParser generateCommandLineParser(Object paramInstance) throws CommandLineParserException {
        return generateCommandLineParser(paramInstance.getClass());
    }

    public static CommandLineParser generateCommandLineParser(Class clazz) throws CommandLineParserException {
        CommandDefinition command = (CommandDefinition) clazz.getAnnotation(CommandDefinition.class);
        if(command == null)
            throw new CommandLineParserException("Commands must be annotated with @CommandDefinition");

        ProcessedCommand processedCommand = new ProcessedCommand(command.name(), command.description(), command.validator());

        for(Field field : clazz.getDeclaredFields()) {
            Option o;
            OptionGroup og;
            OptionList ol;
View Full Code Here


    public static CommandLineParser generateCommandLineParser(Object paramInstance) throws CommandLineParserException {
        return generateCommandLineParser(paramInstance.getClass());
    }

    public static CommandLineParser generateCommandLineParser(Class clazz) throws CommandLineParserException {
        CommandDefinition command = (CommandDefinition) clazz.getAnnotation(CommandDefinition.class);
        if(command == null)
            throw new CommandLineParserException("Commands must be annotated with @CommandDefinition");

        ProcessedCommand processedCommand = new ProcessedCommand(command.name(), command.description(), command.validator());

        for(Field field : clazz.getDeclaredFields()) {
            Option o;
            OptionGroup og;
            OptionList ol;
View Full Code Here

    public static CommandLineParser generateCommandLineParser(Object paramInstance) throws CommandLineParserException {
        return generateCommandLineParser(paramInstance.getClass());
    }

    public static CommandLineParser generateCommandLineParser(Class clazz) throws CommandLineParserException {
        CommandDefinition command = (CommandDefinition) clazz.getAnnotation(CommandDefinition.class);
        if(command == null)
            throw new CommandLineParserException("Commands must be annotated with @CommandDefinition");

        ProcessedCommand processedCommand = new ProcessedCommand(command.name(), command.description(),
                command.validator(), command.resultHandler());

        for(Field field : clazz.getDeclaredFields()) {
            Option o;
            OptionGroup og;
            OptionList ol;
View Full Code Here

    }

    private static AeshCommandContainer doGenerateCommandLineParser(Object commandObject,
                                                                    boolean clazzIsaCommand, boolean isChild) throws CommandLineParserException {
        Class clazz = commandObject.getClass();
        CommandDefinition command = (CommandDefinition) clazz.getAnnotation(CommandDefinition.class);
        if(command != null) {
            ProcessedCommand processedCommand = new ProcessedCommandBuilder()
                    .name(command.name())
                    .description(command.description())
                    .validator(command.validator())
                    .resultHandler(command.resultHandler()).create();

            processCommand(processedCommand, clazz);

            if(clazzIsaCommand)
                return new AeshCommandContainer(
View Full Code Here

    public static CommandLineParser generateCommandLineParser(Object paramInstance) throws CommandLineParserException {
        return generateCommandLineParser(paramInstance.getClass());
    }

    public static CommandLineParser generateCommandLineParser(Class clazz) throws CommandLineParserException {
        CommandDefinition command = (CommandDefinition) clazz.getAnnotation(CommandDefinition.class);
        if(command == null)
            throw new CommandLineParserException("Commands must be annotated with @CommandDefinition");

        ProcessedCommand processedCommand = new ProcessedCommand(command.name(), command.description(),
                command.validator(), command.resultHandler());

        for(Field field : clazz.getDeclaredFields()) {
            Option o;
            OptionGroup og;
            OptionList ol;
View Full Code Here

    public static CommandLineParser generateCommandLineParser(Object paramInstance) throws CommandLineParserException {
        return generateCommandLineParser(paramInstance.getClass());
    }

    public static CommandLineParser generateCommandLineParser(Class clazz) throws CommandLineParserException {
        CommandDefinition command = (CommandDefinition) clazz.getAnnotation(CommandDefinition.class);
        if(command == null)
            throw new CommandLineParserException("Commands must be annotated with @CommandDefinition");

        ProcessedCommand processedCommand = new ProcessedCommand(command.name(), command.description(),
                command.validator(), command.resultHandler());

        for(Field field : clazz.getDeclaredFields()) {
            Option o;
            OptionGroup og;
            OptionList ol;
View Full Code Here

TOP

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

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.