KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > util > launcher > parser > RunDescription


1 /*====================================================================
2
3 ObjectWeb Util Launcher Package.
4 Copyright (C) 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): Romain Rouvoy.
23 Contributor(s): Christophe Contreras.
24
25 --------------------------------------------------------------------
26 $Id: RunDescription.java,v 1.2 2004/09/28 15:19:47 contrera Exp $
27 ====================================================================*/

28
29 package org.objectweb.util.launcher.parser ;
30
31
32 /**
33  * Representation of a run.<BR>
34  * <p>
35  * An option describe additionnal informations.
36  * It contains:
37  * <li>
38  * <ul>an identifier</ul>
39  * <ul>a list of arguments</ul>
40  * <ul>a list of properties</ul>
41  * <ul>a list of Java classes</ul>
42  * <ul>the name of the bootstrap class</ul>
43  * </li>
44  * </p>
45  *
46  * @author <a HREF="mailto:Romain.Rouvoy@lifl.fr">Romain Rouvoy</a>
47  * @version 0.1
48  */

49 public class RunDescription
50      extends ContextDescription
51 {
52     /** the name of the main class to run */
53     protected String JavaDoc mainclass_ ;
54
55     /** the mode of execution */
56     protected String JavaDoc mode_ ;
57
58     /**
59      * Defines the full name of the main class
60      *
61      * @param name - the name of the class (with the package) containing
62      * a method public static void main(String[])
63      */

64     public void setMainclass(String JavaDoc name) {
65         mainclass_ = name ;
66     }
67     
68     /**
69      * Provide the full name of the class to run
70      *
71      * @return the name of the class (with the package, eg: xxx.xxx.Hello)
72      */

73     public String JavaDoc getMainclass() {
74         return mainclass_;
75     }
76
77     /**
78      * Defines the mode for the execution
79      *
80      * @param mode - the mode
81      */

82     public void setMode(String JavaDoc mode) {
83         mode_ = mode ;
84     }
85
86     /**
87      * Provide the mode for execution
88      *
89      * @return the mode (normal, thread, daemon)
90      */

91     public String JavaDoc getMode() {
92         return mode_;
93     }
94 }
95
Popular Tags