mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-30 08:12:05 +00:00
Renaming StringIdMap to Main and ipdating documentation
This commit is contained in:
parent
ede693648f
commit
43d1beb31a
@ -41,9 +41,9 @@ import java.text.SimpleDateFormat;
|
||||
import org.mozilla.javascript.EvaluatorException;
|
||||
import org.mozilla.javascript.tools.ToolErrorReporter;
|
||||
|
||||
public class StringIdMap {
|
||||
public class Main {
|
||||
|
||||
private static final String PROGRAM_NAME = "StringIdMap";
|
||||
private static final String PROGRAM_NAME = "Main";
|
||||
|
||||
private static final String SWITCH_TAG_STR = "string_id_map";
|
||||
private static final String GENERATED_TAG_STR = "generated";
|
||||
@ -470,7 +470,7 @@ public class StringIdMap {
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
StringIdMap self = new StringIdMap();
|
||||
Main self = new Main();
|
||||
int status = self.exec(args);
|
||||
System.exit(status);
|
||||
}
|
@ -1,8 +1,12 @@
|
||||
Notes on StringIdMap (main class org.mozilla.javascript.tools.idswitch.StringIdMap) utility
|
||||
|
||||
USING IDSWITCH GENERATOR TOOL
|
||||
|
||||
Usage:
|
||||
java org.mozilla.javascript.tools.idswitch.Main <SINGLE-JAVA-SOURCE>
|
||||
|
||||
The main purpose of this utility is to generate Java code to map strings to some ids that can be used, for example, in a switch statement.
|
||||
|
||||
The utility scans the file for lines with the following structure:
|
||||
The utility scans the input file for lines with the following structure:
|
||||
|
||||
// #string_id_map#
|
||||
... <DEFINITION AREA>
|
||||
@ -68,7 +72,9 @@ For example, if file x.java contains:
|
||||
|
||||
|
||||
then invocation
|
||||
java org.mozilla.javascript.tools.string_switch.StringIdMap x.java
|
||||
|
||||
java org.mozilla.javascript.tools.idswitch.Main x.java
|
||||
|
||||
would replace that by a code fragment similar to:
|
||||
|
||||
// #string_id_map#
|
||||
|
Loading…
Reference in New Issue
Block a user