Package org.apache.cxf.tools.common.toolspec.parser

Examples of org.apache.cxf.tools.common.toolspec.parser.CommandLineParser


       
    }
   
    public TestUtils(String toolName, InputStream in) throws Exception {
        ToolSpec spec = new ToolSpec(in, false);
        CommandLineParser parser = new CommandLineParser(spec);
        String usage = parser.getUsage();
        mUsage = "Usage : " + toolName + " " + usage;
        mDetailedUsage = toolName + " " + usage + System.getProperty("line.separator")
                          + System.getProperty("line.separator");
        mDetailedUsage += "Options : " + System.getProperty("line.separator") + parser.getDetailedUsage()
                           + System.getProperty("line.separator");
        mDetailedUsage += parser.getToolUsage() + System.getProperty("line.separator")
                           + System.getProperty("line.separator");
    }
View Full Code Here


            checkParams(errors);
        }            
    }
   
    private void outputInfo() {
        CommandLineParser parser = getCommandLineParser();

        if (commandDocument.hasParameter("help")) {
            try {
                out.println(name + " " + getUsage());
                out.println();
                out.println("Options: ");
                out.println();
                out.println(parser.getFormattedDetailedUsage());
                String toolUsage = parser.getToolUsage();
                if (toolUsage != null) {
                    out.println(toolUsage);
                }
            } catch (Exception ex) {
                err.println("Error: Could not output detailed usage");
View Full Code Here

    }

    public String getUsage() {
        if (usage == null) {
            try {
                CommandLineParser parser = getCommandLineParser();

                if (parser != null) {
                    usage = parser.getUsage();
                }
            } catch (Exception ex) {
                usage = "Could not get usage for the tool";
            }
        }
View Full Code Here

        }       
    }
   
    public void parseCommandLine() throws BadUsageException {
        if (toolspec != null) {
            parser = new CommandLineParser(toolspec);
            commandDoc = parser.parseArguments(arguments);          
        }
    }
View Full Code Here

            checkParams(errors);
        }            
    }
   
    private void outputInfo() {
        CommandLineParser parser = getCommandLineParser();

        if (commandDocument.hasParameter("help")) {
            try {
                out.println(name + " " + getUsage());
                out.println();
                out.println("Options: ");
                out.println();
                out.println(parser.getFormattedDetailedUsage());
                String toolUsage = parser.getToolUsage();
                if (toolUsage != null) {
                    out.println(toolUsage);
                }
            } catch (Exception ex) {
                err.println("Error: Could not output detailed usage");
View Full Code Here

    }

    public String getUsage() {
        if (usage == null) {
            try {
                CommandLineParser parser = getCommandLineParser();

                if (parser != null) {
                    usage = parser.getUsage();
                }
            } catch (Exception ex) {
                usage = "Could not get usage for the tool";
            }
        }
View Full Code Here

            checkParams(errors);
        }            
    }
   
    private void outputInfo() {
        CommandLineParser parser = getCommandLineParser();

        if (commandDocument.hasParameter("help")) {
            try {
                System.out.println(name + " " + getUsage());
                System.out.println();
                System.out.println("Options : ");
                System.out.println();
                System.out.println(parser.getDetailedUsage());
                String toolUsage = parser.getToolUsage();

                if (toolUsage != null) {
                    System.out.println(toolUsage);
                    System.out.println();
                }
View Full Code Here

    }

    public String getUsage() {
        if (usage == null) {
            try {
                CommandLineParser parser = getCommandLineParser();

                if (parser != null) {
                    usage = parser.getUsage();
                }
            } catch (Exception ex) {
                usage = "Could not get usage for the tool";
            }
        }
View Full Code Here

            checkParams(errors);
        }            
    }
   
    private void outputInfo() {
        CommandLineParser parser = getCommandLineParser();

        if (commandDocument.hasParameter("help")) {
            try {
                System.out.println(name + " " + getUsage());
                System.out.println();
                System.out.println("Options : ");
                System.out.println();
                System.out.println(parser.getDetailedUsage());
                String toolUsage = parser.getToolUsage();

                if (toolUsage != null) {
                    System.out.println(toolUsage);
                    System.out.println();
                }
View Full Code Here

    }

    public String getUsage() {
        if (usage == null) {
            try {
                CommandLineParser parser = getCommandLineParser();

                if (parser != null) {
                    usage = parser.getUsage();
                }
            } catch (Exception ex) {
                usage = "Could not get usage for the tool";
            }
        }
View Full Code Here

TOP

Related Classes of org.apache.cxf.tools.common.toolspec.parser.CommandLineParser

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.