polyglot.frontend
Class SourceJob

java.lang.Object
  extended by polyglot.frontend.Job
      extended by polyglot.frontend.SourceJob

public class SourceJob
extends Job

A SourceJob encapsulates work done by the compiler on behalf of one source file. It includes all information carried between phases of the compiler.


Field Summary
protected  java.util.Set dependencies
          Set of Sources that this SourceJob depends upon.
protected  java.util.Set dependents
          Set of Sources that depend on this job.
protected  Source source
          The Source that this Job is for.
 
Fields inherited from class polyglot.frontend.Job
ast, ext, initialErrorCount, lang, nextPass, passes, passMap, reportedErrors, runningPass, status
 
Constructor Summary
SourceJob(ExtensionInfo lang, JobExt ext, Source source, Node ast)
          Constructor
 
Method Summary
 void addDependency(Source s)
           
 void addDependent(Source s)
           
 java.util.Set dependencies()
           
 java.util.Set dependents()
           
 java.util.List getPasses()
          The initial list of passes is just the list that the language extension provides us with.
 Source source()
          Return the Source associated with the SourceJob returned by sourceJob.
 SourceJob sourceJob()
          Get the SourceJob associated with this Job.
 java.lang.String toString()
           
 
Methods inherited from class polyglot.frontend.Job
ast, ast, compiler, completed, completed, completedPasses, context, dump, ext, extensionInfo, finishPass, getPreviousTo, init, isRunning, lastBarrier, nextPass, passByID, passes, pending, pendingPasses, reportedErrors, runningPass, setRunningPass, spawn, status, userSpecified
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

source

protected Source source
The Source that this Job is for.


dependencies

protected java.util.Set dependencies
Set of Sources that this SourceJob depends upon. This will include, but is not limited to, the other Sources that this SourceJob caused to load.


dependents

protected java.util.Set dependents
Set of Sources that depend on this job.

Constructor Detail

SourceJob

public SourceJob(ExtensionInfo lang,
                 JobExt ext,
                 Source source,
                 Node ast)
Constructor

Method Detail

dependencies

public java.util.Set dependencies()

dependents

public java.util.Set dependents()

addDependent

public void addDependent(Source s)

addDependency

public void addDependency(Source s)

getPasses

public java.util.List getPasses()
The initial list of passes is just the list that the language extension provides us with.

Specified by:
getPasses in class Job

source

public Source source()
Description copied from class: Job
Return the Source associated with the SourceJob returned by sourceJob.

Overrides:
source in class Job

sourceJob

public SourceJob sourceJob()
Description copied from class: Job
Get the SourceJob associated with this Job. If this Job is a SourceJob, then this object should be returned; otherwise the most suitable SourceJob should be returned. See subclasses' documentation for more details of what the most suitable SourceJob is.

Specified by:
sourceJob in class Job

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object