Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.7.0)

E13403-08

oracle.ide.compiler
Class CompileArguments

java.lang.Object
  extended by oracle.ide.compiler.CompileArguments

public class CompileArguments
extends java.lang.Object

This class defines the arguments for a compilation using the Compiler.compile() entrypoint.

Since:
11.1.2.0.0

Constructor Summary
CompileArguments(Context context)
          Create a new CompileArguments object
 
Method Summary
 Context getContext()
          Get the Context which will be used during the compilation and which defines what will be recompiled.
 java.io.OutputStream getDiagnosticsStream()
          Get the OutputStream for compilation diagnostics if those diagnostics need to be redirected.
 java.io.OutputStream getOutputStream()
          Get the OutputStream for compilation output (any non-diagnostic output) if that output needs to be redirected.
 PostBuilder getPostBuilder()
          The PostBuilder which will be used after the compilation has finished.
 boolean isCompileDependentProjects()
          Determine if the build should compile dependent projects first before any project compile.
 boolean isRebuildAllSources()
          If true, all sources are unconditionally compiled; if false, only the sources that need compiling will be recompiled.
 boolean isSaveBeforeCompiling()
          If true, AND the IDE setting to save before compile is true (see Preferences | Compiler | Save All before Compiling), a save-all is issued before the compilation.
 boolean isWaitForTermination()
          If true, the compile call will not return till the build is finished; if false, the compile call will return immediately.
 void setCompileDepdendentProjects(boolean compileDependentProjects)
          Set the compile dependent projects flag, which indicates if dependent projects should be compiled before a project is compiled.
 void setDiagnosticsStream(java.io.OutputStream diagnosticsStream)
          Set the output stream that should be used for diagnostics.
 void setOutputStream(java.io.OutputStream outputStream)
          Set the output stream that should be used for compilation output (any non-diagnostic output).
 void setPostBuilder(PostBuilder postBuilder)
          Set the PostBuilder that will be used after the compilation.
 void setRebuildAllSources(boolean rebuildAllSources)
          Set the rebuild all sources flag.
 void setSaveBeforeCompiling(boolean saveBeforeCompiling)
          Set the save before compiling flag.
 void setWaitForTermination(boolean waitForTermination)
          Set the wait for termination flag.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CompileArguments

public CompileArguments(Context context)
Create a new CompileArguments object

Parameters:
context - The context that defines what will be compiled, which cannot be null
Throws:
java.lang.IllegalArgumentException - if context is null
Method Detail

getContext

public Context getContext()
Get the Context which will be used during the compilation and which defines what will be recompiled. To recompile one target, such as a Workspace or a Project, use Context.setNode(Element) to set the Context.NODE property to that target. To recompile multiple targets, use Context.setSelection(Element[]) to set the Context.SELECTION property to the array of targets that need compilation. This method will always return a valid context.

Returns:
A Context that defines what needs to be compiled

isRebuildAllSources

public boolean isRebuildAllSources()
If true, all sources are unconditionally compiled; if false, only the sources that need compiling will be recompiled. The default of this flag is false.

Returns:
True if a rebuild is desired, false otherwise

setRebuildAllSources

public void setRebuildAllSources(boolean rebuildAllSources)
Set the rebuild all sources flag. By default this flag is true.

Parameters:
rebuildAllSources - The flag that indicates if all sources should be rebuild or not

isSaveBeforeCompiling

public boolean isSaveBeforeCompiling()
If true, AND the IDE setting to save before compile is true (see Preferences | Compiler | Save All before Compiling), a save-all is issued before the compilation. By default this flag is false

Returns:
True if a save before compilation is desired

setSaveBeforeCompiling

public void setSaveBeforeCompiling(boolean saveBeforeCompiling)
Set the save before compiling flag. By default this flag is false.

Parameters:
saveBeforeCompiling - The save before compiling flag

isWaitForTermination

public boolean isWaitForTermination()
If true, the compile call will not return till the build is finished; if false, the compile call will return immediately. By default this flag is true.

Returns:
True if the compile call should wait for termination of the build, false otherwise

setWaitForTermination

public void setWaitForTermination(boolean waitForTermination)
Set the wait for termination flag. By default this flag is true

Parameters:
waitForTermination - The new flag

isCompileDependentProjects

public boolean isCompileDependentProjects()
Determine if the build should compile dependent projects first before any project compile. This flag is true by default.

Returns:
If true, dependent projects of a project are compiled before the project itself, if false, only the project itself is compiled

setCompileDepdendentProjects

public void setCompileDepdendentProjects(boolean compileDependentProjects)
Set the compile dependent projects flag, which indicates if dependent projects should be compiled before a project is compiled. This flag is true by default.

Parameters:
compileDependentProjects - The new flag

getOutputStream

public java.io.OutputStream getOutputStream()
Get the OutputStream for compilation output (any non-diagnostic output) if that output needs to be redirected. By default this method returns null which forces output to go to STDOUT (System.out).

Returns:
An OutputStream, or null if output doesn't need to be redirected

setOutputStream

public void setOutputStream(java.io.OutputStream outputStream)
Set the output stream that should be used for compilation output (any non-diagnostic output). By default compilation output is send to SDTOUT.

Parameters:
outputStream - The output stream to be used for compilation output

getDiagnosticsStream

public java.io.OutputStream getDiagnosticsStream()
Get the OutputStream for compilation diagnostics if those diagnostics need to be redirected. By default this method return null, which forces diagnostics go to SDTERR (System.err).

Returns:
An OutputStream, or null if diagnostics don't need to be redirected

setDiagnosticsStream

public void setDiagnosticsStream(java.io.OutputStream diagnosticsStream)
Set the output stream that should be used for diagnostics. By default, diagnostics are send to STDERR.

Parameters:
diagnosticsStream - The output stream to be used for diagnostics

getPostBuilder

public PostBuilder getPostBuilder()
The PostBuilder which will be used after the compilation has finished. By default there is no PostBuilder defined.

Returns:
A PostBuilder or null if there is none.

setPostBuilder

public void setPostBuilder(PostBuilder postBuilder)
Set the PostBuilder that will be used after the compilation. By default no PostBuilder is used.

Parameters:
postBuilder - The PostBuilder to be used after the compilation

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.7.0)

E13403-08

Copyright © 1997, 2013, Oracle. All rights reserved.