mjc

org.multijava.mjc
Class Main.TreeProcessingTask

java.lang.Object
  extended byorg.multijava.mjc.Main.Task
      extended byorg.multijava.mjc.Main.TreeProcessingTask
All Implemented Interfaces:
Comparable, Main.Trees
Direct Known Subclasses:
Main.CheckInitializerTask, Main.CheckInterfaceTask, Main.MjdocTask, Main.PreprocessTask, Main.PrettyPrintTask, Main.ResolveSpecializerTask, Main.ResolveTopMethodTask, Main.TranslateMJTask, Main.TypecheckTask
Enclosing class:
Main

public abstract class Main.TreeProcessingTask
extends Main.Task
implements Main.Trees

This class is subclasses by classes that represent tasks operating on a forest of ASTs.


Field Summary
protected  MessageDescription passCompletedMessage
           
protected  CompilerPassEnterable[] trees
           
 
Fields inherited from class org.multijava.mjc.Main.Task
 
Constructor Summary
Main.TreeProcessingTask(int priority, Object sequenceID, CompilerPassEnterable[] trees, MessageDescription passCompletedMessage)
          Constructs a task that operates on an AST forest.
 
Method Summary
 void execute()
           
protected abstract  void processTree(CompilerPassEnterable tree)
           
 CompilerPassEnterable[] trees()
          Returns the result of processing the trees on which this was instantiated.
 
Methods inherited from class org.multijava.mjc.Main.Task
compareTo, priority, sequenceID, setToMainSequenceID
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

passCompletedMessage

protected MessageDescription passCompletedMessage

trees

protected CompilerPassEnterable[] trees
Constructor Detail

Main.TreeProcessingTask

public Main.TreeProcessingTask(int priority,
                               Object sequenceID,
                               CompilerPassEnterable[] trees,
                               MessageDescription passCompletedMessage)
Constructs a task that operates on an AST forest.

 requires trees != null;
 requires (\forall int i; 0 <= i && i < trees.length;
           trees[i] != null && trees[i].arePassParametersCached);
 

Method Detail

execute

public void execute()
Description copied from class: Main.Task
Executes the task represented by this.

 requires !completed;
 ensures completed;
 


trees

public CompilerPassEnterable[] trees()
Returns the result of processing the trees on which this was instantiated.

 also
 requires completed;
 

Specified by:
trees in interface Main.Trees

processTree

protected abstract void processTree(CompilerPassEnterable tree)

mjc

mjc is Copyright (C) 2000-2004 by Iowa State University and is distributed under the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. mjc is based in part on the Kopi project Copyright (C) 1990-99 DMS Decision Management Systems Ges.m.b.H.