summaryrefslogblamecommitdiff
path: root/sources/scalac/transformer/AddConstructorsPhase.java
blob: 7ea83ae584ba5e9f914e6a6370ccc8047e1b7652 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14













                                                                          
                         
























                                                               








                                                  
 
/*     ____ ____  ____ ____  ______                                     *\
**    / __// __ \/ __// __ \/ ____/    SOcos COmpiles Scala             **
**  __\_ \/ /_/ / /__/ /_/ /\_ \       (c) 2002, LAMP/EPFL              **
** /_____/\____/\___/\____/____/                                        **
**                                                                      **
\*                                                                      */

// $Id$

//package scala.compiler.backend;
package scalac.transformer;

import java.util.HashMap;

import scalac.checkers.*;
import scalac.Global;
import scalac.Phase;
import scalac.PhaseDescriptor;

public class AddConstructorsPhase extends PhaseDescriptor {

    /** Maps the old constructor symbols to the new ones
     */
    HashMap constructors = new HashMap();

    public String name() {
	return "addconstructors";
    }

    public String description() {
	return "add explicit constructor for each class";
    }

    public String taskDescription() {
	return "added constructors";
    }

    public Phase createPhase(Global global) {
	return new AddConstructors(global, this, constructors);
    }

    public Checker[] postCheckers(Global global) {
        return new Checker[] {
            new CheckSymbols(global),
            new CheckTypes(global),
            new CheckOwners(global),
	    new CheckNames(global)
        };
    }
}