Main Page
    Cookbook/Overview     ImageMeister     the jcprops file     Licensing
    Binary Installation & Configuration [ Win · Mac · Nix · OSX ]     Changes
    Public API
    Source Code Main Page
        Java [ Common · Win · Mac · Nix ]     Native Code [ Common · Win · Mac · Nix ]     Manifest
        Native Code Overviews [ Common · Win · Mac · Nix · Strings ]     Macros [ General · Native Macros ]
        Walkthroughs [ Java only · Java and native ]     Building [ Win · Mac · Nix · OSX ]     Distribution Issues

All Packages  This Package  Class Hierarchy  Class Search  Index

Class com.jconfig.win.CommandLineUtilsMSVM
java.lang.Object
   |
   +----com.jconfig.win.CommandLineUtilsMSVM

  Summary

class  CommandLineUtilsMSVM
     extends java.lang.Object
{
          // Fields 4
     private static final String copyrightString;
     private static final int kMaxReturns;
     private static final String[] noQ;
     private static final String[] withQ;

          // Constructors 1
     private CommandLineUtilsMSVM();

          // Methods 11
     private static String addQuotesToLongFileNames(String);
     static String createCommandLine(String, Vector);
     static RegCommandMSVM[] findVerbs(String, String);
     static Vector findVerbs(String[]);
     private static RegCommandMSVM[] makeRegCommandArray(String[], int, int);
     private static String meldCommandLine(Vector, Vector);
     private static String popAllArgs(Vector, String);
     private static String popAllSplits(Vector, String);
     private static String popOneArg(Vector, String);
     private static String popOneSplit(Vector, String);
     private static void splitCommandLine(String, int, Vector);

}

A singleton used to deal with command lines.

findVerbs() gets the VATs of an application.

createCommandLine() creates a command line from a command line template and a series of arguments.

Author:
Copyright (c) 1997-2002 Samizdat Productions. All Rights Reserved.




  Fields

· copyrightString

Summary  |  Top

   private static final String copyrightString


· kMaxReturns

Summary  |  Top
   private static final int kMaxReturns

See the 'findVerbs' method.


· noQ

Summary  |  Top
   private static final String[] noQ

Used by 'splitCommandLine'


· withQ

Summary  |  Top
   private static final String[] withQ

Used by 'splitCommandLine'


  Constructors

· CommandLineUtilsMSVM

Summary  |  Top

   private CommandLineUtilsMSVM() 


  Methods

· findVerbs

Summary  |  Top
   static Vector findVerbs(String[] fullPaths) 

Find the VATs of an array of files. See 'RegCommandMSVM.java' for a description of the VAT format.

Parameter Description
fullPaths the full paths of the application "c:\windows\notepad.exe"

Returns:
each object in the return Vector is an array of RegCommandMSVM objects, in the same order as the input file names


· findVerbs

Summary  |  Top
   static RegCommandMSVM[] findVerbs(String fullPath, 
                                     String fileName) 

Find the VATs of a given file. See 'RegCommandMSVM.java' for a description of the VAT format.

Parameter Description
fullPath the full path of the application "c:\windows\notepad.exe"
fileName the name of the app "notepad.exe"



· makeRegCommandArray

Summary  |  Top
   private static RegCommandMSVM[] makeRegCommandArray(String[] qs, 
                                                       int startIndex, 
                                                       int numVats) 


· createCommandLine

Summary  |  Top
   static String createCommandLine(String template, 
                                   Vector argVector) 

Create a command line from a Registry-style command line template and a Vector of arguments Each argument placeholder ("%1", etc.) will be replaced with one of the arguments Unused placeholders will be removed Excess arguments will be added after the last placeholder, or at the end of the command line Arguments which contains spaces will be surrounded with quotes.

Parameter Description
template the command line template, e.g., "c:\windows\notepad.exe %1 /p %2"
argVector contains the list of arguments, may have zero or more elements



· splitCommandLine

Summary  |  Top
   private static void splitCommandLine(String s, 
                                        int argNum, 
                                        Vector vec) 

Splits a command line into one or more segments. Each split occurs at the location of an argument placeholder: %1 or "%1", %2 or "%2", etc. Each segment is appended to 'vec'

After calling this method, call 'meldCommandLine' with a Vector containing the arguments, which will be melded into the command line.

For instance, "c:\windows\notepad.exe %1 -d %2" will be split into three strings:
	"c:\windows\notepad.exe "
	" -d "
	""



· meldCommandLine

Summary  |  Top
   private static String meldCommandLine(Vector splits, 
                                         Vector args) 

'splits' contains the vector of command line segments from 'splitCommandLine' fold these together with the command line arguments in 'args'



· popOneSplit

Summary  |  Top
   private static String popOneSplit(Vector splits, 
                                     String s) 


· popAllSplits

Summary  |  Top
   private static String popAllSplits(Vector splits, 
                                      String s) 


· popOneArg

Summary  |  Top
   private static String popOneArg(Vector args, 
                                   String s) 


· popAllArgs

Summary  |  Top
   private static String popAllArgs(Vector args, 
                                    String s) 


· addQuotesToLongFileNames

Summary  |  Top
   private static String addQuotesToLongFileNames(String s) 


All Packages  This Package  Class Hierarchy  Class Search  Index
Freshly brewed Java API Documentation automatically generated with polardoc Version 1.0.7