Package org.jboss.aesh.cl.exception

Examples of org.jboss.aesh.cl.exception.ArgumentParserException


                        else {
                            active.addProperty(name, value);
                            commandLine.addOption(active);
                            active = null;
                            if(addedArgument)
                                commandLine.setParserException(new ArgumentParserException("An argument was given to an option that do not support it."));
                        }
                    }
                }
                else if(active != null && (!active.hasValue() || active.getValue() != null)) {
                    active.addValue("true");
                    commandLine.addOption(active);
                    active = null;
                    if(addedArgument)
                        commandLine.setParserException(new ArgumentParserException("An argument was given to an option that do not support it."));
                }
                else if(active == null)
                    commandLine.setParserException(new OptionParserException("Option: "+parseLine+" is not a valid option for this command"));
            }
            //name
View Full Code Here


                    commandLine.addOption(new
                            ParsedOption(active.getName(), active.getLongName(),
                            new OptionProperty(name, value), active.getType()));
                    active = null;
                    if(addedArgument)
                        throw new ArgumentParserException("An argument was given to an option that do not support it.");
                }
                else if(active != null && (!active.hasValue() || active.getValue() != null)) {
                    commandLine.addOption(new ParsedOption(active.getName(), active.getLongName(),
                            active.getValue(), active.getType()));
                    active = null;
                    if(addedArgument)
                        throw new ArgumentParserException("An argument was given to an option that do not support it.");
                }
                else if(active == null)
                    throw new OptionParserException("Option: "+parseLine+" is not a valid option for this command");
            }
            //name
View Full Code Here

                        else {
                            active.addProperty(name, value);
                            commandLine.addOption(active);
                            active = null;
                            if(addedArgument)
                                commandLine.setParserException(new ArgumentParserException("An argument was given to an option that do not support it."));
                        }
                    }
                }
                else if(active != null && (!active.hasValue() || active.getValue() != null)) {
                    active.addValue("true");
                    commandLine.addOption(active);
                    active = null;
                    if(addedArgument)
                        commandLine.setParserException(new ArgumentParserException("An argument was given to an option that do not support it."));
                }
                else if(active == null)
                    commandLine.setParserException(new OptionParserException("Option: "+parseLine+" is not a valid option for this command"));
            }
            //name
View Full Code Here

                        else {
                            active.addProperty(name, value);
                            commandLine.addOption(active);
                            active = null;
                            if(addedArgument)
                                commandLine.setParserException(new ArgumentParserException("An argument was given to an option that do not support it."));
                        }
                    }
                }
                else if(active != null && active.getValue() != null) {
                    if(!active.getEndsWithSeparator()) {
                        commandLine.addOption(active);
                        active = null;
                    }
                }
                else if(active != null && active.getOptionType().equals(OptionType.BOOLEAN) &&
                        (!active.hasValue() || active.getValue() != null)) {
                    active.addValue("true");
                    commandLine.addOption(active);
                    active = null;
                    if(addedArgument)
                        commandLine.setParserException(new ArgumentParserException("An argument was given to an option that do not support it."));
                }
                else if(active == null)
                    commandLine.setParserException(new OptionParserException("Option: "+parseLine+" is not a valid option for this command"));
            }
            //name
View Full Code Here

                    commandLine.addOption(new
                            ParsedOption(active.getName(), active.getLongName(),
                            new OptionProperty(name, value), active.getType()));
                    active = null;
                    if(addedArgument)
                        throw new ArgumentParserException("An argument was given to an option that do not support it.");
                }
                else if(active != null && (!active.hasValue() || active.getValue() != null)) {
                    commandLine.addOption(new ParsedOption(active.getName(), active.getLongName(),
                            active.getValue(), active.getType()));
                    active = null;
                    if(addedArgument)
                        throw new ArgumentParserException("An argument was given to an option that do not support it.");
                }
                else if(active == null)
                    throw new OptionParserException("Option: "+parseLine+" is not a valid option for this command");
            }
            //name
View Full Code Here

                        else {
                            active.addProperty(name, value);
                            commandLine.addOption(active);
                            active = null;
                            if(addedArgument)
                                commandLine.setParserException(new ArgumentParserException("An argument was given to an option that does not support it."));
                        }
                    }
                }
                else if(active != null && active.getValue() != null) {
                    if(!active.getEndsWithSeparator()) {
                        commandLine.addOption(active);
                        active = null;
                    }
                }
                else if(active != null && active.getOptionType().equals(OptionType.BOOLEAN) &&
                        (!active.hasValue() || active.getValue() != null)) {
                    active.addValue("true");
                    commandLine.addOption(active);
                    active = null;
                    if(addedArgument)
                        commandLine.setParserException(new ArgumentParserException("An argument was given to an option that does not support it."));
                }
                else if(active == null)
                    commandLine.setParserException(new OptionParserException("Option: "+parseLine+" is not a valid option for this command"));
            }
            //name
View Full Code Here

                        else {
                            active.addProperty(name, value);
                            commandLine.addOption(active);
                            active = null;
                            if(addedArgument)
                                commandLine.setParserException(new ArgumentParserException("An argument was given to an option that do not support it."));
                        }
                    }
                }
                else if(active != null && active.getValue() != null) {
                    if(!active.getEndsWithSeparator()) {
                        commandLine.addOption(active);
                        active = null;
                    }
                }
                else if(active != null && active.getOptionType().equals(OptionType.BOOLEAN) &&
                        (!active.hasValue() || active.getValue() != null)) {
                    active.addValue("true");
                    commandLine.addOption(active);
                    active = null;
                    if(addedArgument)
                        commandLine.setParserException(new ArgumentParserException("An argument was given to an option that do not support it."));
                }
                else if(active == null)
                    commandLine.setParserException(new OptionParserException("Option: "+parseLine+" is not a valid option for this command"));
            }
            //name
View Full Code Here

                        else {
                            active.addProperty(name, value);
                            commandLine.addOption(active);
                            active = null;
                            if(addedArgument)
                                commandLine.setParserException(new ArgumentParserException("An argument was given to an option that do not support it."));
                        }
                    }
                }
                else if(active != null && active.getValue() != null) {
                    if(!active.getEndsWithSeparator()) {
                        commandLine.addOption(active);
                        active = null;
                    }
                }
                else if(active != null && active.getOptionType().equals(OptionType.BOOLEAN) &&
                        (!active.hasValue() || active.getValue() != null)) {
                    active.addValue("true");
                    commandLine.addOption(active);
                    active = null;
                    if(addedArgument)
                        commandLine.setParserException(new ArgumentParserException("An argument was given to an option that do not support it."));
                }
                else if(active == null)
                    commandLine.setParserException(new OptionParserException("Option: "+parseLine+" is not a valid option for this command"));
            }
            //name
View Full Code Here

TOP

Related Classes of org.jboss.aesh.cl.exception.ArgumentParserException

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.