KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > openccm > task > IR3toJava


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.
23 Contributor(s): ________________________________________.
24
25 ====================================================================*/

26
27 package org.objectweb.openccm.task;
28
29 // Package dependencies
30
import java.io.File JavaDoc;
31 import java.util.Map JavaDoc;
32
33
34 /**
35  * This task generates the Java container code associated to an OpenCCM Interface Repository
36  * object and its children objects.
37  *
38  * @author <a HREF="mailto:Christophe.Demarey@lifl.fr">Christophe Demarey</a>
39  *
40  * @version 0.1
41  */

42 public class IR3toJava
43      extends LauncherApplication
44   implements Runnable JavaDoc
45 {
46     // ==================================================================
47
//
48
// Internal states.
49
//
50
// ==================================================================
51

52     /** The output directory name. */
53     private File JavaDoc dest_dir_;
54
55     /** The scope to generate. */
56     private String JavaDoc scope_;
57
58     // ==================================================================
59
//
60
// Constructors.
61
//
62
// ==================================================================
63

64     /**
65      * The default constructor.
66      *
67      * @param project_properties - Properties of the Ant Project.
68      */

69     public IR3toJava(Map JavaDoc project_properties)
70     {
71         // Call CompilerBase constructor
72
super(project_properties);
73         
74         // Init internal states
75
dest_dir_ = null;
76         scope_ = null;
77     }
78     
79     // ==================================================================
80
//
81
// Internal methods.
82
//
83
// ==================================================================
84

85     // ==================================================================
86
//
87
// Public methods.
88
//
89
// ==================================================================
90

91     /**
92      * Configure the task.
93      */

94     public void
95     configure()
96     {
97         setXmlFile( project_properties_.getProperty("OpenCCM_HOMEDIR") + "/xml/launcher/IR3toJava.xml" );
98         addProperty( "OpenCCM_CONFIG_DIR",
99                      project_properties_.getProperty("OpenCCM_CONFIG_DIR") );
100         // Set working directory
101
setWorkingDirectory(dest_dir_);
102         // Add target scope
103
addArgument(scope_);
104     }
105
106     /**
107      * Set Java mapping output directory.
108      *
109      * @param outputdir - The output directory name.
110      */

111     public void
112     setDestdir(String JavaDoc filename)
113     {
114         dest_dir_ = new java.io.File JavaDoc(filename);
115     }
116     
117     /**
118      * Set the scope to generate.
119      *
120      * @param scope - The scope to generate.
121      */

122     public void
123     setScope(String JavaDoc scope)
124     {
125         scope_ = scope;
126     }
127 }
128
Popular Tags