KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > ccm > scripts > XMICompiler


1 /*====================================================================
2
3 OpenCCM: The Open CORBA Component Model Platform
4 Copyright (C) 2000-2002 USTL - LIFL - GOAL
5 Contact: openccm-team@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): Tran Huynh (tran.huynh@fr.thalesgroup.com)
23 Contributor(s): .
24
25 ====================================================================*/

26
27 package org.objectweb.ccm.scripts;
28
29 /**
30  * This class manages the OpenCCM XMI Compiler.
31  */

32 public class XMICompiler {
33
34     /**
35      * The options manager.
36      */

37     private IR3XMIOptionsManager manager_;
38
39     /**
40      * Version.
41      */

42     private java.lang.String JavaDoc version_;
43
44     /**
45      * Constructor.
46      *
47      * @param manager The options manager.
48      * @param version The version.
49      */

50     public
51     XMICompiler(IR3XMIOptionsManager manager,
52                 java.lang.String JavaDoc version) {
53         manager_ = manager;
54         version_ = version;
55     }
56
57     /**
58      * This method prints a message to the standard output.
59      */

60     protected void
61     message(String JavaDoc text) {
62         System.out.println(version_ + " : " + text);
63     }
64
65     /**
66      * This method analyzes the command line arguments.
67      *
68      * @return True if everything is ok, false otherwise.
69      */

70     public boolean run(java.lang.String JavaDoc[] cmdline) {
71         if (manager_.analyse(cmdline) == -1) {
72             return false;
73         }
74         return true;
75     }
76
77     /**
78      * This method returns the options manager.
79      *
80      * @return The options manager.
81      */

82     public IR3XMIOptionsManager
83     getManager() {
84         return manager_;
85     }
86 }
87
Popular Tags