mjc

org.multijava.mjc
Class Main.CheckInitializerTask

java.lang.Object
  extended byorg.multijava.mjc.Main.Task
      extended byorg.multijava.mjc.Main.TreeProcessingTask
          extended byorg.multijava.mjc.Main.CheckInitializerTask
All Implemented Interfaces:
Comparable, Main.Trees
Enclosing class:
Main

public class Main.CheckInitializerTask
extends Main.TreeProcessingTask

This class typechecks the initializers of the declarations in the source code. The class is constructed on an AST forest.


Field Summary
 
Fields inherited from class org.multijava.mjc.Main.TreeProcessingTask
passCompletedMessage, trees
 
Fields inherited from class org.multijava.mjc.Main.Task
 
Constructor Summary
Main.CheckInitializerTask(CompilerPassEnterable[] trees, Object sequenceID)
          Constructs a task for checking the initializers in the given forest.
 
Method Summary
 void execute()
           
protected  void processTree(CompilerPassEnterable tree)
          Checks the initializers created during the checkInterface pass and performs some other checks that can be performed simply before full blown typechecking.
 
Methods inherited from class org.multijava.mjc.Main.TreeProcessingTask
trees
 
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
 

Constructor Detail

Main.CheckInitializerTask

public Main.CheckInitializerTask(CompilerPassEnterable[] trees,
                                 Object sequenceID)
Constructs a task for checking the initializers in the given forest. Stores an alias to trees.

Method Detail

execute

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

 requires !completed;
 ensures completed;
 

Overrides:
execute in class Main.TreeProcessingTask

processTree

protected void processTree(CompilerPassEnterable tree)
Checks the initializers created during the checkInterface pass and performs some other checks that can be performed simply before full blown typechecking. Among these other checks are those for appropriateness of subclassing, such as inheritance circularities and "reimplementation" of interfaces.

Parameters:
tree - the compilation unit to be checked

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.