KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > util > cmdline > api > Usage


1 /*====================================================================
2
3 ObjectWeb Util CommandLine Package.
4 Copyright (C) 2002 INRIA & USTL - LIFL - GOAL
5 Contact: architecture@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): Philippe Merle.
23 Contributor(s): ______________________________________.
24
25 ====================================================================*/

26
27 package org.objectweb.util.cmdline.api;
28
29 //import dependencies
30
import org.objectweb.util.misc.api.Printable;
31
32 /**
33  * This interface represents command line and option usages.
34  *
35  * This provides the following properties:
36  *
37  * - Labels: The usage labels.
38  * - Arguments: The usage arguments.
39  * - Description: The usage description.
40  *
41  * The org.objectweb.util.misc.api.Printable.print method
42  * prints all the usage properties.
43  *
44  * @author <a HREF="mailto:Philippe.Merle@lifl.fr">Philippe Merle</a>
45  *
46  * @version 0.1
47  */

48
49 public interface Usage
50          extends Printable
51 {
52     /**
53      * Gets the usage labels.
54      *
55      * @return The usage labels.
56      */

57     public String JavaDoc[]
58     getLabels();
59
60     /**
61      * Sets the usage labels.
62      *
63      * @param labels The usage labels.
64      */

65     public void
66     setLabels(String JavaDoc[] labels);
67
68     /**
69      * Gets the usage arguments.
70      *
71      * @return The usage arguments.
72      */

73     public String JavaDoc[]
74     getArguments();
75
76     /**
77      * Sets the usage arguments.
78      *
79      * @param arguments The usage arguments.
80      */

81     public void
82     setArguments(String JavaDoc[] arguments);
83
84     /**
85      * Gets the additional arguments flag.
86      *
87      * @return True if additional (undefined) arguments are allowed.
88      */

89     public boolean
90     getAdditionalArguments();
91     
92     /**
93      * Sets the additional arguments flag.
94      *
95      * @param args the additional arguments flag (true for allowing).
96      */

97     public void
98     setAdditionalArguments(boolean args);
99     
100     /**
101      * Gets the usage description.
102      *
103      * @return The usage description.
104      */

105     public String JavaDoc[]
106     getDescription();
107
108     /**
109      * Sets the usage description.
110      *
111      * @param description The usage description.
112      */

113     public void
114     setDescription(String JavaDoc[] description);
115 }
116
Popular Tags