coins.driver
クラス CompileThread

java.lang.Object
  |
  +--java.lang.Thread
        |
        +--coins.driver.CompileThread
すべての実装インタフェース:
java.lang.Runnable

public class CompileThread
extends java.lang.Thread

A compiler thread.
COINS Compiler Driver API executes compile steps of one compile unit by one thread. If the option -conis:compile-paralle is specified, all the threads are concurrently executed.
The compiler modules executed in the thread can get the thread object by a method Thread.currentThread(), whose return value can be narrowed to this class.
Some services are provided by the thread object:


入れ子クラスの概要
(パッケージプライベート)  class CompileThread.Assembler
           
(パッケージプライベート)  class CompileThread.Compiler
           
(パッケージプライベート)  class CompileThread.Linker
           
(パッケージプライベート)  class CompileThread.PassGroup
           
(パッケージプライベート)  class CompileThread.Preprocessor
           
 
フィールドの概要
(パッケージプライベート)  StopWatch fClock
           
(パッケージプライベート)  CompilerImplementation fImplementation
           
(パッケージプライベート)  IoRoot fIoRoot
           
(パッケージプライベート)  boolean fIsLinkerThread
           
(パッケージプライベート)  java.lang.String fSourceFileName
           
(パッケージプライベート)  CompileSpecification fSpec
           
(パッケージプライベート)  CompileStatus fStatus
           
(パッケージプライベート)  TemporaryFileManager fTemporaryFileManager
           
(パッケージプライベート)  java.util.Map fThreadLocalVariables
           
 
クラス java.lang.Thread から継承したフィールド
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
コンストラクタの概要
(パッケージプライベート) CompileThread(java.lang.String pSourceFileName, CompileSpecification pSpec, TemporaryFileManager pTemporaryFileManager, CompilerImplementation pImplementation, CompileStatus pStatus, boolean pIsLinkerThread)
           
 
メソッドの概要
 java.io.File createTemporaryFile()
          Returns a File object representing a newly created temporary file.
 long elapsedTime()
          Returns an elapsed mili-seconds since this thread was started.
 int getExitStatus()
          Gets the current value of the exit status.
 IoRoot getIoRoot()
          Gets an IoRoot object.
 java.lang.Object getThreadLocalVariableValue(java.lang.String varName)
          Gets the value of a thread local variable.
 boolean isDefinedThreadLocalVariable(java.lang.String varName)
          Tests if a thread local variable is defined or not.
 java.lang.Object removeThreadLocalVariable(java.lang.String varName)
          Removes a thread local variable.
 void run()
           
 void setABEND()
          Sets a value representing `abnormal end' to the exit status.
 void setExitStatus(int s)
          Sets a value to the exit status of this compilation.
 java.lang.Object setThreadLocalVariableValue(java.lang.String varName, java.lang.Object value)
          Sets a value to a thread local variable.
 void storeToFile(java.io.InputStream in, java.io.File dest)
          Reads data from an InputStream and stores them to a file.
 
クラス java.lang.Thread から継承したメソッド
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield
 
クラス java.lang.Object から継承したメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

フィールドの詳細

fSourceFileName

java.lang.String fSourceFileName

fIsLinkerThread

boolean fIsLinkerThread

fTemporaryFileManager

TemporaryFileManager fTemporaryFileManager

fImplementation

CompilerImplementation fImplementation

fSpec

CompileSpecification fSpec

fIoRoot

IoRoot fIoRoot

fStatus

CompileStatus fStatus

fThreadLocalVariables

java.util.Map fThreadLocalVariables

fClock

StopWatch fClock
コンストラクタの詳細

CompileThread

CompileThread(java.lang.String pSourceFileName,
              CompileSpecification pSpec,
              TemporaryFileManager pTemporaryFileManager,
              CompilerImplementation pImplementation,
              CompileStatus pStatus,
              boolean pIsLinkerThread)
メソッドの詳細

getIoRoot

public IoRoot getIoRoot()
Gets an IoRoot object.

戻り値:
the IoRoot object.

getExitStatus

public int getExitStatus()
Gets the current value of the exit status.

戻り値:
the exit status value.

setABEND

public void setABEND()
Sets a value representing `abnormal end' to the exit status.


setExitStatus

public void setExitStatus(int s)
Sets a value to the exit status of this compilation.

パラメータ:
s - the status value

isDefinedThreadLocalVariable

public boolean isDefinedThreadLocalVariable(java.lang.String varName)
Tests if a thread local variable is defined or not.

パラメータ:
varName - the name of the variable
戻り値:
true if the variable has been defined, false otherwise.

getThreadLocalVariableValue

public java.lang.Object getThreadLocalVariableValue(java.lang.String varName)
Gets the value of a thread local variable.

パラメータ:
varName - the name of the variable.
戻り値:
the value of the variable if it has been defined, null otherwise.

setThreadLocalVariableValue

public java.lang.Object setThreadLocalVariableValue(java.lang.String varName,
                                                    java.lang.Object value)
Sets a value to a thread local variable. If the variable is has not been defined yet, the variable is newly defined and the value is set.

パラメータ:
varName - the name of the variable
戻り値:
the old value of the variable if it has been defined, null otherwise.

removeThreadLocalVariable

public java.lang.Object removeThreadLocalVariable(java.lang.String varName)
Removes a thread local variable.

パラメータ:
varName - the name of the variable
戻り値:
the value of the variable if it has been defined, null otherwise.

elapsedTime

public long elapsedTime()
Returns an elapsed mili-seconds since this thread was started.

戻り値:
elapsed time.

createTemporaryFile

public java.io.File createTemporaryFile()
                                 throws java.io.IOException
Returns a File object representing a newly created temporary file. The file is removed when the compiler exited.

戻り値:
a File object representing a temporary file.
例外:
java.io.IOException - if temporary file creation fails.

storeToFile

public void storeToFile(java.io.InputStream in,
                        java.io.File dest)
                 throws java.io.IOException
Reads data from an InputStream and stores them to a file.

パラメータ:
in - the source InputStream
dest - the destination File
例外:
java.io.IOException - if storing data to a file fails

run

public void run()
定義:
インタフェース java.lang.Runnable 内の run
オーバーライド:
クラス java.lang.Thread 内の run