KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > openccm > command > lib > CommandOnASTBase


1 /*====================================================================
2
3 OpenCCM: The Open CORBA Component Model Platform
4 Copyright (C) 2000-2004 INRIA & USTL - LIFL - GOAL
5 Contact: openccm@objectweb.org
6
7 This library is free software; you can redistribute it and/or
8 modify it under the terms of the GNU Lesser General Public
9 License as published by the Free Software Foundation; either
10 version 2.1 of the License, or any later version.
11
12 This library is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 Lesser General Public License for more details.
16
17 You should have received a copy of the GNU Lesser General Public
18 License along with this library; if not, write to the Free Software
19 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
20 USA
21
22 Initial developer(s): Christophe Demarey, Philippe Merle.
23 Contributor(s): ______________________________________.
24
25 ====================================================================*/

26
27 package org.objectweb.openccm.command.lib;
28
29 // Package dependencies.
30
import org.objectweb.openccm.command.api.CommandOnAST;
31 import org.objectweb.util.cmdline.api.CommandLine;
32
33 /**
34  * Abstract base class for all commands working with the OpenCCM Abstract Syntax Tree.
35  *
36  * @author <a HREF="mailto:Christophe.Demarey@lifl.fr">Christophe Demarey</a>
37  * <a HREF="mailto:Philippe.Merle@lifl.fr">Philippe Merle</a>
38  *
39  * @version 1.2
40  */

41
42 public abstract class CommandOnASTBase
43               extends CommandOnIR3Base
44            implements CommandOnAST
45 {
46     // ==================================================================
47
//
48
// Internal state.
49
//
50
// ==================================================================
51

52     /** The Abstract Syntax Tree. */
53     private org.objectweb.openccm.ast.api.AST ast_;
54
55     // ==================================================================
56
//
57
// Constructor.
58
//
59
// ==================================================================
60

61     /**
62      * The constructor with the command line manager.
63      *
64      * @param commandLine The command line manager.
65      */

66     public
67     CommandOnASTBase(CommandLine commandLine)
68     {
69         // Calls the CommandOnIR3Base constructor.
70
super(commandLine);
71
72         // Inits internal state.
73
ast_ = null;
74     }
75
76     // ==================================================================
77
//
78
// Internal methods.
79
//
80
// ==================================================================
81

82     // ==================================================================
83
//
84
// Public methods for org.objectweb.util.cmdline.api.Application
85
//
86
// ==================================================================
87

88     // ==================================================================
89
//
90
// Public methods for org.objectweb.openccm.command.api.Application
91
//
92
// ==================================================================
93

94     // ==================================================================
95
//
96
// Public methods for org.objectweb.openccm.command.api.CommandOnIR3
97
//
98
// ==================================================================
99

100     // ==================================================================
101
//
102
// Public methods for org.objectweb.openccm.command.api.CommandOnAST
103
//
104
// ==================================================================
105

106     /**
107      * Inits the OpenCCM Abstract Syntax Tree.
108      *
109      * @return True if ok, else false.
110      */

111     public boolean
112     initAST()
113     {
114         // Checks availability of the OpenCCM Interface Repository.
115
if(!checkComponentRepository())
116             return false;
117
118         // Creates the OpenCCM Abstract Syntax Tree.
119
ast_ = new org.objectweb.openccm.ast.lib.Repository(getComponentRepository());
120
121         return true;
122     }
123
124     /**
125      * Obtains the OpenCCM Abstract Syntax Tree.
126      *
127      * @return The OpenCCM Abstract Syntax Tree.
128      */

129     public org.objectweb.openccm.ast.api.AST
130     getAST()
131     {
132         return ast_;
133     }
134
135     // ==================================================================
136
//
137
// Other public methods.
138
//
139
// ==================================================================
140
}
141
Popular Tags