Class Main
java.lang.Object
org.mozilla.javascript.tools.jsc.Main
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Stringprivate ClassCompilerprivate CompilerEnvironsprivate Stringprivate booleanprivate ToolErrorReporterprivate Stringprivate String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidprivate voidaddFormatedError(String message) private static voidPrint a usage message.(package private) StringgetClassName(String name) Verify that class file names are legal Java identifiers.private FilegetOutputFile(File parentDir, String className) static voidMain entry point.private static voidString[]processOptions(String[] args) Parse arguments.voidprocessSource(String[] filenames) Compile JavaScript source.private StringreadSource(File f)
-
Field Details
-
printHelp
private boolean printHelp -
reporter
-
compilerEnv
-
compiler
-
targetName
-
targetPackage
-
destinationDir
-
characterEncoding
-
-
Constructor Details
-
Main
public Main()
-
-
Method Details
-
main
Main entry point. Process arguments as would a normal Java program. Then set up the execution environment and begin to compile scripts. -
processOptions
-
badUsage
Print a usage message. -
processSource
Compile JavaScript source. -
readSource
-
getOutputFile
- Throws:
IOException
-
getClassName
-
p
-
addError
-
addFormatedError
-