Class Main

java.lang.Object
org.mozilla.javascript.tools.jsc.Main

public class Main extends Object
  • Field Details

    • printHelp

      private boolean printHelp
    • reporter

      private ToolErrorReporter reporter
    • compilerEnv

      private CompilerEnvirons compilerEnv
    • compiler

      private ClassCompiler compiler
    • targetName

      private String targetName
    • targetPackage

      private String targetPackage
    • destinationDir

      private String destinationDir
    • characterEncoding

      private String characterEncoding
  • Constructor Details

    • Main

      public Main()
  • Method Details

    • main

      public static void main(String[] args)
      Main entry point. Process arguments as would a normal Java program. Then set up the execution environment and begin to compile scripts.
    • processOptions

      public String[] processOptions(String[] args)
      Parse arguments.
    • badUsage

      private static void badUsage(String s)
      Print a usage message.
    • processSource

      public void processSource(String[] filenames)
      Compile JavaScript source.
    • readSource

      private String readSource(File f)
    • getOutputFile

      private File getOutputFile(File parentDir, String className) throws IOException
      Throws:
      IOException
    • getClassName

      String getClassName(String name)
      Verify that class file names are legal Java identifiers. Substitute illegal characters with underscores, and prepend the name with an underscore if the file name does not begin with a JavaLetter.
    • p

      private static void p(String s)
    • addError

      private void addError(String messageId, String arg)
    • addFormatedError

      private void addFormatedError(String message)