Class Main.TreeProcessingTask

  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:

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


protected MessageDescription passCompletedMessage


protected CompilerPassEnterable[] trees
Constructor Detail


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


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

 requires !completed;
 ensures completed;


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

 requires completed;

Specified by:
trees in interface Main.Trees


protected abstract void processTree(CompilerPassEnterable tree)


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.