Top Description Fields Constructors Methods
org.hsqldb.util

public Class CodeSwitcher

extends Object
Class Inheritance
Imports
java.io.BufferedReader, .File, .FileReader, .FileWriter, .IOException, .LineNumberReader, java.util.ArrayList

Modifies the source code to support different JDK or profile settings.
Usage: java CodeSwitcher paths|{--pathlist=listfile} [{+|-}label...] [+][-]
If no labels are specified then all used
labels in the source code are shown.
Use +MODE to switch on the things labeld MODE
Use -MODE to switch off the things labeld MODE
Path: Any number of path or files may be
specified. Use . for the current directory
(including sub-directories).
Example: java CodeSwitcher +JAVA2 .
This example switches on code labeled JAVA2
in all *.java files in the current directory
and all subdirectories.
java CodeSwitcher + .
Adds test code to the code.
java CodeSwitcher - .
Removes test code from the code
Author
Thomas Mueller (Hypersonic SQL Group)
Since
Hypersonic SQL
Version
2.5.0

Field Summary

Modifier and TypeField and Description
private static final String
private static final int
private ArrayList<String>
private ArrayList<String>
private ArrayList<String>
private ArrayList<String>

Constructor Summary

AccessConstructor and Description
pack-priv
CodeSwitcher()

Constructor declaration

Method Summary

Modifier and TypeMethod and Description
pack-priv void
addDir(String path)

pack-priv void
pack-priv static ArrayList<String>
public static void
main(String[] a)

pack-priv static void
pack-priv void
printSwitches()

Method declaration

pack-priv void
process()

Method declaration

pack-priv boolean
pack-priv static void
showUsage()

Method declaration

public int
size()

pack-priv static void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

lsback to summary
private static final String ls
MAX_LINELENGTHback to summary
private static final int MAX_LINELENGTH
vListback to summary
private ArrayList<String> vList
vSwitchesback to summary
private ArrayList<String> vSwitches
vSwitchOffback to summary
private ArrayList<String> vSwitchOff
vSwitchOnback to summary
private ArrayList<String> vSwitchOn

Constructor Detail

CodeSwitcherback to summary
pack-priv CodeSwitcher()

Constructor declaration

Method Detail

addDirback to summary
pack-priv void addDir(String path)
addDirback to summary
pack-priv void addDir(File f)
getFileLinesback to summary
pack-priv static ArrayList<String> getFileLines(File f) throws IOException
mainback to summary
public static void main(String[] a)
printErrorback to summary
pack-priv static void printError(String error)
printSwitchesback to summary
pack-priv void printSwitches()

Method declaration

processback to summary
pack-priv void process()

Method declaration

processFileback to summary
pack-priv boolean processFile(String name)
showUsageback to summary
pack-priv static void showUsage()

Method declaration

sizeback to summary
public int size()
writeFileLinesback to summary
pack-priv static void writeFileLines(ArrayList<E> v, File f) throws IOException