Examples of ParsedArgument


Examples of com.sun.enterprise.tools.upgrade.common.arguments.ParsedArgument

                    i++;
                    parameters.add(arguments[i]);
                }
                if ( instructionHandler != null ) {
                    interactiveMap.put(cmd, parameters);
                    instructions.addElement(new ParsedArgument(instructionHandler,
                            cmd, parameters, commonInfo, interactiveMap));
                } else {
                    String msg = sm.getString("enterprise.tools.upgrade.cli.invalid_option",
                            rawArg);
        if (cmd.equals(ADMINPASSWORD_SHORT) || cmd.equals(ADMINPASSWORD)) {
      msg = msg + "\n" +
                                sm.getString("enterprise.tools.upgrade.cli.deprecated_option",rawArg) +
              " " +
                                sm.getString("enterprise.tools.upgrade.cli.deprecated_option.adminpassword");
        } else if (cmd.equals(MASTERPASSWORD_SHORT) || cmd.equals(MASTERPASSWORD)) {
      msg = msg + "\n" +
                                sm.getString("enterprise.tools.upgrade.cli.deprecated_option",rawArg) +
              " " +
                                sm.getString("enterprise.tools.upgrade.cli.deprecated_option.masterpassword");
        }
                    
                    helpUsage(msg);
                    commonInfo.recover();       
                    System.exit(1);
                }
            }
        }
       
        //Process the parsed instructions for all arguments passed.
        Enumeration e = instructions.elements();
        while ( e.hasMoreElements() ) {
            ParsedArgument  pi = (ParsedArgument )e.nextElement();
            instructionHandler = pi.getHandler();
            try {
                Class [] parameterTypes = new Class [] {pi.getClass()};
                Constructor constructor =
                        instructionHandler.getConstructor(parameterTypes);
                constructor.newInstance(new Object [] { pi });
            } catch (Exception ex) {
                _logger.log(Level.INFO,
                        sm.getString("enterprise.tools.upgrade.cli.invalid_option",
                        pi.getMneumonic()), ex);
                commonInfo.recover();   
                System.exit(1);
            }
        }
View Full Code Here

Examples of com.sun.enterprise.tools.upgrade.common.arguments.ParsedArgument

    public void helpUsage(){
        helpUsage(0);
    }
   
    public void helpUsage(int exitCode) {
        new ARG_help(new ParsedArgument(null, null, null, commonInfo, null), exitCode);       
    }
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.