js.tinyvm.util
Class TinyVMCommandLineParser

java.lang.Object
  extended by js.tinyvm.util.TinyVMCommandLineParser
Direct Known Subclasses:
NXJCommandLineParser

public class TinyVMCommandLineParser
extends Object

CommandLineParser

Rating red

Field Summary
protected  org.apache.commons.cli.Options options
           
protected  org.apache.commons.cli.CommandLine result
           
 
Constructor Summary
TinyVMCommandLineParser(boolean reqoutput)
           
 
Method Summary
 String getBP()
           
 String getCP()
           
protected static String getLastOptVal(org.apache.commons.cli.CommandLine cmdline, String key)
           
protected static String getLastOptVal(org.apache.commons.cli.CommandLine cmdline, String key, String def)
           
 String getOutput()
           
 String[] getRestArgs()
           
 int getRunTimeOptions()
           
 boolean isAll()
           
 boolean isBigEndian()
           
 boolean isDebug()
           
 boolean isEnableAssert()
           
 boolean isEnableChecks()
           
 boolean isHelp()
           
 boolean isVerbose()
           
 void parse(String[] args)
          Parse commandline.
 boolean parseOrHelp(Class<?> mainclass, String[] args)
           
 void printHelp(Class<?> mainclass)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

options

protected final org.apache.commons.cli.Options options

result

protected org.apache.commons.cli.CommandLine result
Constructor Detail

TinyVMCommandLineParser

public TinyVMCommandLineParser(boolean reqoutput)
Method Detail

getLastOptVal

protected static String getLastOptVal(org.apache.commons.cli.CommandLine cmdline,
                                      String key)

getLastOptVal

protected static String getLastOptVal(org.apache.commons.cli.CommandLine cmdline,
                                      String key,
                                      String def)

isHelp

public boolean isHelp()

isAll

public boolean isAll()

isDebug

public boolean isDebug()

isVerbose

public boolean isVerbose()

isEnableAssert

public boolean isEnableAssert()

isEnableChecks

public boolean isEnableChecks()

getOutput

public String getOutput()

getBP

public String getBP()

getCP

public String getCP()

isBigEndian

public boolean isBigEndian()

getRestArgs

public String[] getRestArgs()

getRunTimeOptions

public int getRunTimeOptions()

parse

public void parse(String[] args)
           throws org.apache.commons.cli.ParseException
Parse commandline.

Parameters:
args - command line
Throws:
TinyVMException
org.apache.commons.cli.ParseException

parseOrHelp

public boolean parseOrHelp(Class<?> mainclass,
                           String[] args)

printHelp

public void printHelp(Class<?> mainclass)