filenet.vw.toolkit.utils

Class VWCommandLineArgs

  • java.lang.Object
    • filenet.vw.base.VWCommandLineArgsEx
      • filenet.vw.toolkit.utils.VWCommandLineArgs


  • public class VWCommandLineArgs
    extends filenet.vw.base.VWCommandLineArgsEx
    Utility class to parse command line arguments into name/value pairs

    This class provides several command line argument parsing options, including the following:

    • Case sensitivity control (default is case-sensitive)—use either the ignoreCase flag in your constructor invocation, or the VWCommandLineArgsEx.setIgnoreCase(boolean) method.
    • Name-value separator character control (as with the delimiter characters, "/", "-", "=" and ":")—specify parameter begin-parameter separator characters (default is "/" or "-") or value separator characters (default is "=" or ":") with VWCommandLineArgsEx.setParamBeginChars(char[]) and VWCommandLineArgsEx.setParamValueDelimiters(char[]), respectively. Begin-parameter separator characters may also be set with the VWCommandLineArgs(String, boolean, char[]) constructor.
    • The name/value pairs occur in a file—refer to VWCommandLineArgs.VWCommandLineArgs(String, boolean).
    • The argv variable contains order-dependent values and does not include names—refer to VWCommandLineArgs.VWCommandLineArgs(String[], String[], boolean).

    Example

    Consider inputting the following command line arguments to this class:

        /x=7 /y:8 -z 9 /detail /verbose 
    The object created with the above arguments contains a parameter "x" with a value of 7, a parameter "y" with a value of 8, and a parameter "z" with a value of 9. The object also contains two flags: "detail" and "verbose".

    Notes about command line flags:

    • Command line flags are normally symbolized as /flagname or -flagname without a paired value, and they hold the empty string value.
    • If an argument has no delimiter, it is defined as a flag: a named value, equal to an empty string.
    • You can identify a parameter name as a flag with the VWCommandLineArgsEx.isPresent(String) method.

    Since:
    eProcess 4.0
    • Method Summary

      • Methods inherited from class filenet.vw.base.VWCommandLineArgsEx

        getIntParameter, getParameter, getParameter, help, isPresent, list, list, load, main, parameterNames, setIgnoreCase, setParamBeginChars, setParamValueDelimiters
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • VWCommandLineArgs

        public VWCommandLineArgs(java.lang.String[] argv,
                         boolean ignoreCase)
      • VWCommandLineArgs

        public VWCommandLineArgs(java.lang.String[] argv,
                         java.lang.String[] argNames,
                         boolean ignoreCase)
      • VWCommandLineArgs

        public VWCommandLineArgs(java.lang.String[] argv,
                         boolean ignoreCase,
                         char[] paramBeginChars)
      • VWCommandLineArgs

        public VWCommandLineArgs(java.lang.String fileName,
                         boolean ignoreCase)
                          throws java.lang.Exception
        Throws:
        java.lang.Exception
      • VWCommandLineArgs

        public VWCommandLineArgs(java.util.Properties props)
      • VWCommandLineArgs

        public VWCommandLineArgs(java.lang.String[] argv)

© Copyright IBM Corporation 2002, 2013. All rights reserved.