root/trunk/ProjectFortress/src/com/sun/fortress/compiler/phases/EmptyPhase.java @ 2406

Revision 2406, 2.4 KB (checked in by mspiegel, 16 months ago)

Added copyright notices.

Line 
1/*******************************************************************************
2  Copyright 2008 Sun Microsystems, Inc.,
3  4150 Network Circle, Santa Clara, California 95054, U.S.A.
4  All rights reserved.
5
6  U.S. Government Rights - Commercial software.
7  Government users are subject to the Sun Microsystems, Inc. standard
8  license agreement and applicable provisions of the FAR and its supplements.
9
10  Use is subject to license terms.
11
12  This distribution may include materials developed by third parties.
13
14  Sun, Sun Microsystems, the Sun logo and Java are trademarks or registered
15  trademarks of Sun Microsystems, Inc. in the U.S. and other countries.
16  ******************************************************************************/
17
18package com.sun.fortress.compiler.phases;
19
20import java.util.Map;
21
22import com.sun.fortress.compiler.AnalyzeResult;
23import com.sun.fortress.compiler.GlobalEnvironment;
24import com.sun.fortress.compiler.IndexBuilder;
25import com.sun.fortress.compiler.typechecker.TypeEnv;
26import com.sun.fortress.exceptions.StaticError;
27import com.sun.fortress.nodes.Api;
28import com.sun.fortress.nodes.Component;
29import com.sun.fortress.nodes.Node;
30import com.sun.fortress.nodes_util.Span;
31import com.sun.fortress.repository.FortressRepository;
32import com.sun.fortress.useful.Debug;
33
34import edu.rice.cs.plt.iter.IterUtil;
35import edu.rice.cs.plt.tuple.Option;
36import edu.rice.cs.plt.tuple.Pair;
37
38public class EmptyPhase extends Phase {
39
40        private final Iterable<Api> apis;
41        private final Iterable<Component> components;
42       
43        public EmptyPhase(FortressRepository repository, GlobalEnvironment env,
44                        Iterable<Api> apis, Iterable<Component> components, long lastModified) {
45                super(null);           
46                this.repository = repository;           
47                this.env = env;
48                this.apis = apis;
49                this.components = components;           
50                this.lastModified = lastModified;
51        }
52
53        @Override       
54    public AnalyzeResult execute( ) throws StaticError {
55        Debug.debug( Debug.Type.FORTRESS, 1, "Start phase Empty" );
56        IndexBuilder.ApiResult apiIndex = IndexBuilder.buildApis(apis, lastModified);
57        IndexBuilder.ComponentResult componentIndex = IndexBuilder.buildComponents(components, lastModified);
58        return new AnalyzeResult(apiIndex.apis(), componentIndex.components(),
59                        IterUtil.<StaticError>empty(), Option.<Map<Pair<Node,Span>, TypeEnv>>none());
60    }
61
62}
Note: See TracBrowser for help on using the browser.