File: gnu.getopt.LongOpt.html

package info (click to toggle)
lib-gnu.getopt-java 1.0.9-1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 224 kB
  • ctags: 106
  • sloc: java: 636; makefile: 51; xml: 47
file content (210 lines) | stat: -rw-r--r-- 7,164 bytes parent folder | download | duplicates (14)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<!--NewPage-->
<html>
<head>
<!-- Generated by javadoc on Sun Aug 30 19:36:38 CDT 1998 -->
<title>
  Class gnu.getopt.LongOpt
</title>
</head>
<body>
<a name="_top_"></a>
<pre>
<a href="packages.html">All Packages</a>  <a href="tree.html">Class Hierarchy</a>  <a href="Package-gnu.getopt.html">This Package</a>  <a href="Package-gnu.getopt.html">Previous</a>  <a href="Package-gnu.getopt.html">Next</a>  <a href="AllNames.html">Index</a></pre>
<hr>
<h1>
  Class gnu.getopt.LongOpt
</h1>
<pre>
java.lang.Object
   |
   +----gnu.getopt.LongOpt
</pre>
<hr>
<dl>
  <dt> public class <b>LongOpt</b>
  <dt> extends Object
</dl>
This object represents the definition of a long option in the Java port
 of GNU getopt.  An array of LongOpt objects is passed to the Getopt
 object to define the list of valid long options for a given parsing
 session.  Refer to the getopt documentation for details on the
 format of long options.
<p>
<dl>
  <dt> <b>Version:</b>
  <dd> 1.0.3
  <dt> <b>Author:</b>
  <dd> Aaron M. Renn (arenn@urbanophile.com)
    <dt> <b>See Also:</b>
    <dd> <a href="gnu.getopt.Getopt.html#_top_">Getopt</a>
</dl>
<hr>
<a name="index"></a>
<h2>
  <img src="images/variable-index.gif" width=207 height=38 alt="Variable Index">
</h2>
<dl>
  <dt> <img src="images/blue-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#NO_ARGUMENT"><b>NO_ARGUMENT</b></a>
  <dd>  Constant value used for the "has_arg" constructor argument.
  <dt> <img src="images/blue-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#OPTIONAL_ARGUMENT"><b>OPTIONAL_ARGUMENT</b></a>
  <dd>  Constant value used for the "has_arg" constructor argument.
  <dt> <img src="images/blue-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#REQUIRED_ARGUMENT"><b>REQUIRED_ARGUMENT</b></a>
  <dd> 
 Constant value used for the "has_arg" constructor argument.
</dl>
<h2>
  <img src="images/constructor-index.gif" width=275 height=38 alt="Constructor Index">
</h2>
<dl>
  <dt> <img src="images/yellow-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#LongOpt(java.lang.String, int, java.lang.StringBuffer, int)"><b>LongOpt</b></a>(String, int, StringBuffer, int)
  <dd>  Create a new LongOpt object with the given parameter values.
</dl>
<h2>
  <img src="images/method-index.gif" width=207 height=38 alt="Method Index">
</h2>
<dl>
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#getFlag()"><b>getFlag</b></a>()
  <dd>  Returns the value of the 'flag' field for this long option

 
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#getHasArg()"><b>getHasArg</b></a>()
  <dd>  Returns the value set for the 'has_arg' field for this long option

 
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#getName()"><b>getName</b></a>()
  <dd>  Returns the name of this LongOpt as a String

 
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#getVal()"><b>getVal</b></a>()
  <dd>  Returns the value of the 'val' field for this long option

 
</dl>
<a name="variables"></a>
<h2>
  <img src="images/variables.gif" width=153 height=38 alt="Variables">
</h2>
<a name="NO_ARGUMENT"><img src="images/blue-ball.gif" width=12 height=12 alt=" o "></a>
<b>NO_ARGUMENT</b>
<pre>
 public static final int NO_ARGUMENT
</pre>
<dl>
  <dd> Constant value used for the "has_arg" constructor argument.  This
 value indicates that the option takes no argument.<p>
</dl>
<a name="REQUIRED_ARGUMENT"><img src="images/blue-ball.gif" width=12 height=12 alt=" o "></a>
<b>REQUIRED_ARGUMENT</b>
<pre>
 public static final int REQUIRED_ARGUMENT
</pre>
<dl>
  <dd> Constant value used for the "has_arg" constructor argument.  This
 value indicates that the option takes an argument that is required.<p>
</dl>
<a name="OPTIONAL_ARGUMENT"><img src="images/blue-ball.gif" width=12 height=12 alt=" o "></a>
<b>OPTIONAL_ARGUMENT</b>
<pre>
 public static final int OPTIONAL_ARGUMENT
</pre>
<dl>
  <dd> Constant value used for the "has_arg" constructor argument.  This
 value indicates that the option takes an argument that is optional.<p>
</dl>
<a name="constructors"></a>
<h2>
  <img src="images/constructors.gif" width=231 height=38 alt="Constructors">
</h2>
<a name="LongOpt"></a>
<a name="LongOpt(java.lang.String, int, java.lang.StringBuffer, int)"><img src="images/yellow-ball.gif" width=12 height=12 alt=" o "></a>
<b>LongOpt</b>
<pre>
 public LongOpt(String name,
                int has_arg,
                StringBuffer flag,
                int val) throws IllegalArgumentException
</pre>
<dl>
  <dd> Create a new LongOpt object with the given parameter values.  If the
 value passed as has_arg is not valid, then an exception is thrown.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> name - The long option String.
    <dd> has_arg - Indicates whether the option has no argument (NO_ARGUMENT), a required argument (REQUIRED_ARGUMENT) or an optional argument (OPTIONAL_ARGUMENT).
    <dd> flag - If non-null, this is a location to store the value of "val" when this option is encountered, otherwise "val" is treated as the equivalent short option character.
    <dd> val - The value to return for this long option, or the equivalent single letter option to emulate if flag is null.
    <dt> <b>Throws:</b> IllegalArgumentException
    <dd> If the has_arg param is not one of NO_ARGUMENT, REQUIRED_ARGUMENT or OPTIONAL_ARGUMENT.
  </dl></dd>
</dl>
<a name="methods"></a>
<h2>
  <img src="images/methods.gif" width=151 height=38 alt="Methods">
</h2>
<a name="getName()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="getName"><b>getName</b></a>
<pre>
 public String getName()
</pre>
<dl>
  <dd> Returns the name of this LongOpt as a String
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> Then name of the long option
  </dl></dd>
</dl>
<a name="getHasArg()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="getHasArg"><b>getHasArg</b></a>
<pre>
 public int getHasArg()
</pre>
<dl>
  <dd> Returns the value set for the 'has_arg' field for this long option
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> The value of 'has_arg'
  </dl></dd>
</dl>
<a name="getFlag()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="getFlag"><b>getFlag</b></a>
<pre>
 public StringBuffer getFlag()
</pre>
<dl>
  <dd> Returns the value of the 'flag' field for this long option
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> The value of 'flag'
  </dl></dd>
</dl>
<a name="getVal()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="getVal"><b>getVal</b></a>
<pre>
 public int getVal()
</pre>
<dl>
  <dd> Returns the value of the 'val' field for this long option
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> The value of 'val'
  </dl></dd>
</dl>
<hr>
<pre>
<a href="packages.html">All Packages</a>  <a href="tree.html">Class Hierarchy</a>  <a href="Package-gnu.getopt.html">This Package</a>  <a href="Package-gnu.getopt.html">Previous</a>  <a href="Package-gnu.getopt.html">Next</a>  <a href="AllNames.html">Index</a></pre>
</body>
</html>