org.eclipse.jdt.internal.compiler.batch
Class Main

java.lang.Object
  extended by org.eclipse.jdt.internal.compiler.batch.Main
All Implemented Interfaces:
ProblemSeverities, SuffixConstants
Direct Known Subclasses:
EclipseCompilerImpl

public class Main
extends Object
implements ProblemSeverities, SuffixConstants


Nested Class Summary
static class Main.Logger
           
static class Main.ResourceBundleFactory
          Resource bundle factory to share bundles for the same locale
 
Field Summary
 Compiler batchCompiler
           
 ResourceBundle bundle
           
static String bundleName
           
protected  FileSystem.Classpath[] checkedClasspaths
           
 String[] classNames
           
 Locale compilerLocale
           
 CompilerOptions compilerOptions
           
 CompilerStats[] compilerStats
           
 int currentRepetition
           
static int DEFAULT_SIZE_CLASSPATH
           
 String destinationPath
           
 String[] destinationPaths
           
 String[] encodings
           
 int exportedClassFilesCounter
           
protected  ArrayList extraProblems
           
 String[] filenames
           
 int globalErrorsCount
           
 int globalProblemsCount
           
 int globalTasksCount
           
 int globalWarningsCount
           
 long lineCount0
           
 String log
           
 Main.Logger logger
           
 int maxProblems
           
 int maxRepetition
           
static String NONE
           
 Map options
           
protected  PrintWriter out
           
 ArrayList pendingErrors
           
 boolean proceed
           
 boolean proceedOnError
           
 boolean produceRefInfo
           
 CompilationProgress progress
           
 boolean showProgress
           
 long startTime
           
 boolean systemExitWhenFinished
           
 int timing
           
static int TIMING_DETAILED
           
static int TIMING_DISABLED
           
static int TIMING_ENABLED
           
 boolean verbose
           
 
Fields inherited from interface org.eclipse.jdt.internal.compiler.problem.ProblemSeverities
Abort, AbortCompilation, AbortCompilationUnit, AbortMethod, AbortType, Error, Fatal, Ignore, Optional, SecondaryError, Warning
 
Fields inherited from interface org.eclipse.jdt.internal.compiler.util.SuffixConstants
EXTENSION_class, EXTENSION_CLASS, EXTENSION_java, EXTENSION_JAVA, SUFFIX_class, SUFFIX_CLASS, SUFFIX_java, SUFFIX_JAVA, SUFFIX_STRING_class, SUFFIX_STRING_CLASS, SUFFIX_STRING_java, SUFFIX_STRING_JAVA
 
Constructor Summary
Main(PrintWriter outWriter, PrintWriter errWriter, boolean systemExitWhenFinished)
          Deprecated. - use Main(PrintWriter, PrintWriter, boolean, Map, CompilationProgress) instead e.g. Main(outWriter, errWriter, systemExitWhenFinished, null, null)
Main(PrintWriter outWriter, PrintWriter errWriter, boolean systemExitWhenFinished, Map customDefaultOptions)
          Deprecated. - use Main(PrintWriter, PrintWriter, boolean, Map, CompilationProgress) instead e.g. Main(outWriter, errWriter, systemExitWhenFinished, customDefaultOptions, null)
Main(PrintWriter outWriter, PrintWriter errWriter, boolean systemExitWhenFinished, Map customDefaultOptions, CompilationProgress compilationProgress)
           
 
Method Summary
 void addExtraProblems(CategorizedProblem problem)
           
protected  void addNewEntry(ArrayList paths, String currentClasspathName, ArrayList currentRuleSpecs, String customEncoding, String destPath, boolean isSourceOnly, boolean rejectDestinationPathOnJars)
           
 String bind(String id)
           
 String bind(String id, String binding)
           
 String bind(String id, String[] arguments)
           
 String bind(String id, String binding1, String binding2)
           
static boolean compile(String commandLine)
          Deprecated. - use BatchCompiler.compile(String, PrintWriter, PrintWriter, CompilationProgress) instead e.g. BatchCompiler.compile(commandLine, new PrintWriter(System.out), new PrintWriter(System.err), null);
 boolean compile(String[] argv)
           
static boolean compile(String[] commandLineArguments, PrintWriter outWriter, PrintWriter errWriter, CompilationProgress progress)
           
static boolean compile(String commandLine, PrintWriter outWriter, PrintWriter errWriter)
          Deprecated. - use BatchCompiler.compile(String, PrintWriter, PrintWriter, CompilationProgress) instead e.g. BatchCompiler.compile(commandLine, outWriter, errWriter, null);
 void configure(String[] argv)
           
protected  void disableErrors()
           
protected  void disableWarnings()
           
 String extractDestinationPathFromSourceFile(CompilationResult result)
           
 ICompilerRequestor getBatchRequestor()
           
 CompilationUnit[] getCompilationUnits()
           
 IErrorHandlingPolicy getHandlingPolicy()
           
 File getJavaHome()
           
static File[][] getLibrariesFiles(File[] files)
           
 FileSystem getLibraryAccess()
           
 IProblemFactory getProblemFactory()
           
protected  ArrayList handleBootclasspath(ArrayList bootclasspaths, String customEncoding)
           
protected  ArrayList handleClasspath(ArrayList classpaths, String customEncoding)
           
protected  ArrayList handleEndorseddirs(ArrayList endorsedDirClasspaths)
           
protected  void handleErrorToken(String token, boolean isEnabling)
           
protected  ArrayList handleExtdirs(ArrayList extdirsClasspaths)
           
protected  void handleWarningToken(String token, boolean isEnabling)
           
protected  void initialize(PrintWriter outWriter, PrintWriter errWriter, boolean systemExit)
          Deprecated. - use initialize(PrintWriter, PrintWriter, boolean, Map, CompilationProgress) instead e.g. initialize(outWriter, errWriter, systemExit, null, null)
protected  void initialize(PrintWriter outWriter, PrintWriter errWriter, boolean systemExit, Map customDefaultOptions)
          Deprecated. - use initialize(PrintWriter, PrintWriter, boolean, Map, CompilationProgress) instead e.g. initialize(outWriter, errWriter, systemExit, customDefaultOptions, null)
protected  void initialize(PrintWriter outWriter, PrintWriter errWriter, boolean systemExit, Map customDefaultOptions, CompilationProgress compilationProgress)
           
protected  void initializeAnnotationProcessorManager()
           
protected  void loggingExtraProblems()
           
static void main(String[] argv)
           
 void outputClassFiles(CompilationResult unitResult)
           
 void performCompilation()
           
 void printUsage()
           
 void processPathEntries(int defaultSize, ArrayList paths, String currentPath, String customEncoding, boolean isSourceOnly, boolean rejectDestinationPathOnJars)
           
 void relocalize()
          Creates a NLS catalog for the given locale.
 void setDestinationPath(String dest)
           
 void setLocale(Locale locale)
           
protected  void setPaths(ArrayList bootclasspaths, String sourcepathClasspathArg, ArrayList sourcepathClasspaths, ArrayList classpaths, ArrayList extdirsClasspaths, ArrayList endorsedDirClasspaths, String customEncoding)
           
static String[] tokenize(String commandLine)
           
protected  void validateOptions(boolean didSpecifyCompliance)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

batchCompiler

public Compiler batchCompiler

bundle

public ResourceBundle bundle

checkedClasspaths

protected FileSystem.Classpath[] checkedClasspaths

compilerLocale

public Locale compilerLocale

compilerOptions

public CompilerOptions compilerOptions

progress

public CompilationProgress progress

destinationPath

public String destinationPath

destinationPaths

public String[] destinationPaths

encodings

public String[] encodings

exportedClassFilesCounter

public int exportedClassFilesCounter

filenames

public String[] filenames

classNames

public String[] classNames

globalErrorsCount

public int globalErrorsCount

globalProblemsCount

public int globalProblemsCount

globalTasksCount

public int globalTasksCount

globalWarningsCount

public int globalWarningsCount

lineCount0

public long lineCount0

log

public String log

logger

public Main.Logger logger

maxProblems

public int maxProblems

options

public Map options

out

protected PrintWriter out

proceed

public boolean proceed

proceedOnError

public boolean proceedOnError

produceRefInfo

public boolean produceRefInfo

currentRepetition

public int currentRepetition

maxRepetition

public int maxRepetition

showProgress

public boolean showProgress

startTime

public long startTime

pendingErrors

public ArrayList pendingErrors

systemExitWhenFinished

public boolean systemExitWhenFinished

TIMING_DISABLED

public static final int TIMING_DISABLED
See Also:
Constant Field Values

TIMING_ENABLED

public static final int TIMING_ENABLED
See Also:
Constant Field Values

TIMING_DETAILED

public static final int TIMING_DETAILED
See Also:
Constant Field Values

timing

public int timing

compilerStats

public CompilerStats[] compilerStats

verbose

public boolean verbose

extraProblems

protected ArrayList extraProblems

bundleName

public static final String bundleName
See Also:
Constant Field Values

DEFAULT_SIZE_CLASSPATH

public static final int DEFAULT_SIZE_CLASSPATH
See Also:
Constant Field Values

NONE

public static final String NONE
See Also:
Constant Field Values
Constructor Detail

Main

public Main(PrintWriter outWriter,
            PrintWriter errWriter,
            boolean systemExitWhenFinished)
Deprecated. - use Main(PrintWriter, PrintWriter, boolean, Map, CompilationProgress) instead e.g. Main(outWriter, errWriter, systemExitWhenFinished, null, null)


Main

public Main(PrintWriter outWriter,
            PrintWriter errWriter,
            boolean systemExitWhenFinished,
            Map customDefaultOptions)
Deprecated. - use Main(PrintWriter, PrintWriter, boolean, Map, CompilationProgress) instead e.g. Main(outWriter, errWriter, systemExitWhenFinished, customDefaultOptions, null)


Main

public Main(PrintWriter outWriter,
            PrintWriter errWriter,
            boolean systemExitWhenFinished,
            Map customDefaultOptions,
            CompilationProgress compilationProgress)
Method Detail

compile

public static boolean compile(String commandLine)
Deprecated. - use BatchCompiler.compile(String, PrintWriter, PrintWriter, CompilationProgress) instead e.g. BatchCompiler.compile(commandLine, new PrintWriter(System.out), new PrintWriter(System.err), null);


compile

public static boolean compile(String commandLine,
                              PrintWriter outWriter,
                              PrintWriter errWriter)
Deprecated. - use BatchCompiler.compile(String, PrintWriter, PrintWriter, CompilationProgress) instead e.g. BatchCompiler.compile(commandLine, outWriter, errWriter, null);


compile

public static boolean compile(String[] commandLineArguments,
                              PrintWriter outWriter,
                              PrintWriter errWriter,
                              CompilationProgress progress)

getLibrariesFiles

public static File[][] getLibrariesFiles(File[] files)

main

public static void main(String[] argv)

tokenize

public static String[] tokenize(String commandLine)

addExtraProblems

public void addExtraProblems(CategorizedProblem problem)

addNewEntry

protected void addNewEntry(ArrayList paths,
                           String currentClasspathName,
                           ArrayList currentRuleSpecs,
                           String customEncoding,
                           String destPath,
                           boolean isSourceOnly,
                           boolean rejectDestinationPathOnJars)

bind

public String bind(String id)

bind

public String bind(String id,
                   String binding)

bind

public String bind(String id,
                   String binding1,
                   String binding2)

bind

public String bind(String id,
                   String[] arguments)

compile

public boolean compile(String[] argv)

configure

public void configure(String[] argv)

disableWarnings

protected void disableWarnings()

disableErrors

protected void disableErrors()

extractDestinationPathFromSourceFile

public String extractDestinationPathFromSourceFile(CompilationResult result)

getBatchRequestor

public ICompilerRequestor getBatchRequestor()

getCompilationUnits

public CompilationUnit[] getCompilationUnits()

getHandlingPolicy

public IErrorHandlingPolicy getHandlingPolicy()

getJavaHome

public File getJavaHome()

getLibraryAccess

public FileSystem getLibraryAccess()

getProblemFactory

public IProblemFactory getProblemFactory()

handleBootclasspath

protected ArrayList handleBootclasspath(ArrayList bootclasspaths,
                                        String customEncoding)

handleClasspath

protected ArrayList handleClasspath(ArrayList classpaths,
                                    String customEncoding)

handleEndorseddirs

protected ArrayList handleEndorseddirs(ArrayList endorsedDirClasspaths)

handleExtdirs

protected ArrayList handleExtdirs(ArrayList extdirsClasspaths)

handleWarningToken

protected void handleWarningToken(String token,
                                  boolean isEnabling)

handleErrorToken

protected void handleErrorToken(String token,
                                boolean isEnabling)

initialize

protected void initialize(PrintWriter outWriter,
                          PrintWriter errWriter,
                          boolean systemExit)
Deprecated. - use initialize(PrintWriter, PrintWriter, boolean, Map, CompilationProgress) instead e.g. initialize(outWriter, errWriter, systemExit, null, null)


initialize

protected void initialize(PrintWriter outWriter,
                          PrintWriter errWriter,
                          boolean systemExit,
                          Map customDefaultOptions)
Deprecated. - use initialize(PrintWriter, PrintWriter, boolean, Map, CompilationProgress) instead e.g. initialize(outWriter, errWriter, systemExit, customDefaultOptions, null)


initialize

protected void initialize(PrintWriter outWriter,
                          PrintWriter errWriter,
                          boolean systemExit,
                          Map customDefaultOptions,
                          CompilationProgress compilationProgress)

initializeAnnotationProcessorManager

protected void initializeAnnotationProcessorManager()

outputClassFiles

public void outputClassFiles(CompilationResult unitResult)

performCompilation

public void performCompilation()

loggingExtraProblems

protected void loggingExtraProblems()

printUsage

public void printUsage()

processPathEntries

public void processPathEntries(int defaultSize,
                               ArrayList paths,
                               String currentPath,
                               String customEncoding,
                               boolean isSourceOnly,
                               boolean rejectDestinationPathOnJars)

relocalize

public void relocalize()
Creates a NLS catalog for the given locale.


setDestinationPath

public void setDestinationPath(String dest)

setLocale

public void setLocale(Locale locale)

setPaths

protected void setPaths(ArrayList bootclasspaths,
                        String sourcepathClasspathArg,
                        ArrayList sourcepathClasspaths,
                        ArrayList classpaths,
                        ArrayList extdirsClasspaths,
                        ArrayList endorsedDirClasspaths,
                        String customEncoding)

validateOptions

protected void validateOptions(boolean didSpecifyCompliance)


Copyright © 2012. All Rights Reserved.