1 | // SECTION-START[License Header] |
2 | // <editor-fold defaultstate="collapsed" desc=" Generated License "> |
3 | /* |
4 | * Copyright (c) 2010 The JOMC Project |
5 | * Copyright (c) 2005 Christian Schulte <cs@jomc.org> |
6 | * All rights reserved. |
7 | * |
8 | * Redistribution and use in source and binary forms, with or without |
9 | * modification, are permitted provided that the following conditions |
10 | * are met: |
11 | * |
12 | * o Redistributions of source code must retain the above copyright |
13 | * notice, this list of conditions and the following disclaimer. |
14 | * |
15 | * o Redistributions in binary form must reproduce the above copyright |
16 | * notice, this list of conditions and the following disclaimer in |
17 | * the documentation and/or other materials provided with the |
18 | * distribution. |
19 | * |
20 | * THIS SOFTWARE IS PROVIDED BY THE JOMC PROJECT AND CONTRIBUTORS "AS IS" |
21 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, |
22 | * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR |
23 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE JOMC PROJECT OR |
24 | * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, |
25 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, |
26 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; |
27 | * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, |
28 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR |
29 | * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF |
30 | * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
31 | * |
32 | * $Id: AbstractJomcCommand.java 1346 2010-01-19 12:16:43Z schulte2005 $ |
33 | * |
34 | */ |
35 | // </editor-fold> |
36 | // SECTION-END |
37 | package org.jomc.cli.commands; |
38 | |
39 | import java.io.BufferedReader; |
40 | import java.io.File; |
41 | import java.io.FileInputStream; |
42 | import java.io.FileReader; |
43 | import java.io.IOException; |
44 | import java.io.InputStream; |
45 | import java.io.StringWriter; |
46 | import java.net.URI; |
47 | import java.net.URL; |
48 | import java.net.URLClassLoader; |
49 | import java.util.HashSet; |
50 | import java.util.LinkedList; |
51 | import java.util.List; |
52 | import java.util.Locale; |
53 | import java.util.Set; |
54 | import java.util.logging.Level; |
55 | import javax.xml.bind.JAXBElement; |
56 | import javax.xml.bind.JAXBException; |
57 | import javax.xml.bind.Marshaller; |
58 | import javax.xml.bind.Unmarshaller; |
59 | import javax.xml.transform.stream.StreamSource; |
60 | import org.apache.commons.cli.CommandLine; |
61 | import org.apache.commons.cli.Option; |
62 | import org.apache.commons.cli.Options; |
63 | import org.jomc.cli.Command; |
64 | import org.jomc.model.DefaultModelProvider; |
65 | import org.jomc.model.ModelContext; |
66 | import org.jomc.model.ModelException; |
67 | import org.jomc.model.Module; |
68 | import org.jomc.model.Modules; |
69 | import org.jomc.tools.JomcTool; |
70 | import org.jomc.model.ModelValidationReport; |
71 | import org.jomc.tools.JavaBundles; |
72 | import org.jomc.tools.JavaClasses; |
73 | import org.jomc.tools.JavaSources; |
74 | import org.xml.sax.SAXException; |
75 | |
76 | // SECTION-START[Documentation] |
77 | // <editor-fold defaultstate="collapsed" desc=" Generated Documentation "> |
78 | /** |
79 | * Base JOMC {@code Command} implementation. |
80 | * <p><b>Specifications</b><ul> |
81 | * <li>{@code org.jomc.cli.Command} {@code 1.0} {@code Multiton}</li> |
82 | * </ul></p> |
83 | * <p><b>Properties</b><ul> |
84 | * <li>"{@link #getAbbreviatedCommandName abbreviatedCommandName}" |
85 | * <blockquote>Property of type {@code java.lang.String}. |
86 | * <p>Abbreviated name of the command.</p> |
87 | * </blockquote></li> |
88 | * <li>"{@link #getClasspathOptionLongName classpathOptionLongName}" |
89 | * <blockquote>Property of type {@code java.lang.String}. |
90 | * <p>Long name of the 'classpath' option.</p> |
91 | * </blockquote></li> |
92 | * <li>"{@link #getClasspathOptionShortName classpathOptionShortName}" |
93 | * <blockquote>Property of type {@code java.lang.String}. |
94 | * <p>Name of the 'classpath' option.</p> |
95 | * </blockquote></li> |
96 | * <li>"{@link #getCommandName commandName}" |
97 | * <blockquote>Property of type {@code java.lang.String}. |
98 | * <p>Name of the command.</p> |
99 | * </blockquote></li> |
100 | * <li>"{@link #getDocumentsOptionLongName documentsOptionLongName}" |
101 | * <blockquote>Property of type {@code java.lang.String}. |
102 | * <p>Long name of the 'documents' option.</p> |
103 | * </blockquote></li> |
104 | * <li>"{@link #getDocumentsOptionShortName documentsOptionShortName}" |
105 | * <blockquote>Property of type {@code java.lang.String}. |
106 | * <p>Name of the 'documents' option.</p> |
107 | * </blockquote></li> |
108 | * <li>"{@link #getModuleLocationOptionLongName moduleLocationOptionLongName}" |
109 | * <blockquote>Property of type {@code java.lang.String}. |
110 | * <p>Long name of the 'module-location' option.</p> |
111 | * </blockquote></li> |
112 | * <li>"{@link #getModuleLocationOptionShortName moduleLocationOptionShortName}" |
113 | * <blockquote>Property of type {@code java.lang.String}. |
114 | * <p>Name of the 'module-location' option.</p> |
115 | * </blockquote></li> |
116 | * <li>"{@link #getModuleNameOptionLongName moduleNameOptionLongName}" |
117 | * <blockquote>Property of type {@code java.lang.String}. |
118 | * <p>Long name of the 'module' option.</p> |
119 | * </blockquote></li> |
120 | * <li>"{@link #getModuleNameOptionShortName moduleNameOptionShortName}" |
121 | * <blockquote>Property of type {@code java.lang.String}. |
122 | * <p>Name of the 'module' option.</p> |
123 | * </blockquote></li> |
124 | * <li>"{@link #getNoClasspathResolutionOptionLongName noClasspathResolutionOptionLongName}" |
125 | * <blockquote>Property of type {@code java.lang.String}. |
126 | * <p>Long name of the 'no-classpath-resolution' option.</p> |
127 | * </blockquote></li> |
128 | * <li>"{@link #getNoClasspathResolutionOptionShortName noClasspathResolutionOptionShortName}" |
129 | * <blockquote>Property of type {@code java.lang.String}. |
130 | * <p>Name of the 'no-classpath-resolution' option.</p> |
131 | * </blockquote></li> |
132 | * </ul></p> |
133 | * <p><b>Dependencies</b><ul> |
134 | * <li>"{@link #getLocale Locale}"<blockquote> |
135 | * Dependency on {@code java.util.Locale} at specification level 1.1 bound to an instance.</blockquote></li> |
136 | * </ul></p> |
137 | * <p><b>Messages</b><ul> |
138 | * <li>"{@link #getApplicationTitleMessage applicationTitle}"<table> |
139 | * <tr><td valign="top">English:</td><td valign="top"><pre>JOMC Version 1.0-alpha-15 Build 2010-01-19T12:08:03+0000</pre></td></tr> |
140 | * </table> |
141 | * <li>"{@link #getCannotProcessMessage cannotProcess}"<table> |
142 | * <tr><td valign="top">English:</td><td valign="top"><pre>Cannot process ''{0}'': {1}</pre></td></tr> |
143 | * <tr><td valign="top">Deutsch:</td><td valign="top"><pre>Kann ''{0}'' nicht verarbeiten: {1}</pre></td></tr> |
144 | * </table> |
145 | * <li>"{@link #getClasspathElementMessage classpathElement}"<table> |
146 | * <tr><td valign="top">English:</td><td valign="top"><pre>Classpath element: ''{0}''</pre></td></tr> |
147 | * <tr><td valign="top">Deutsch:</td><td valign="top"><pre>Klassenpfad-Element: ''{0}''</pre></td></tr> |
148 | * </table> |
149 | * <li>"{@link #getClasspathOptionMessage classpathOption}"<table> |
150 | * <tr><td valign="top">English:</td><td valign="top"><pre>Classpath elements separated by ''{0}''. If starting with a ''@'' character, a file name of a file holding classpath elements.</pre></td></tr> |
151 | * <tr><td valign="top">Deutsch:</td><td valign="top"><pre>Klassenpfad-Elemente mit ''{0}'' getrennt. Wenn mit ''@'' beginnend, Dateiname einer Textdatei mit Klassenpfad-Elementen.</pre></td></tr> |
152 | * </table> |
153 | * <li>"{@link #getClasspathOptionArgNameMessage classpathOptionArgName}"<table> |
154 | * <tr><td valign="top">English:</td><td valign="top"><pre>elements</pre></td></tr> |
155 | * <tr><td valign="top">Deutsch:</td><td valign="top"><pre>Elemente</pre></td></tr> |
156 | * </table> |
157 | * <li>"{@link #getDefaultLogLevelInfoMessage defaultLogLevelInfo}"<table> |
158 | * <tr><td valign="top">English:</td><td valign="top"><pre>Default log level: ''{0}''</pre></td></tr> |
159 | * <tr><td valign="top">Deutsch:</td><td valign="top"><pre>Standard-Protokollierungsstufe: ''{0}''</pre></td></tr> |
160 | * </table> |
161 | * <li>"{@link #getDocumentFileMessage documentFile}"<table> |
162 | * <tr><td valign="top">English:</td><td valign="top"><pre>Document file: ''{0}''</pre></td></tr> |
163 | * <tr><td valign="top">Deutsch:</td><td valign="top"><pre>Dokument-Datei: ''{0}''</pre></td></tr> |
164 | * </table> |
165 | * <li>"{@link #getDocumentsOptionMessage documentsOption}"<table> |
166 | * <tr><td valign="top">English:</td><td valign="top"><pre>Document filenames separated by ''{0}''. If starting with a ''@'' character, a file name of a file holding document filenames.</pre></td></tr> |
167 | * <tr><td valign="top">Deutsch:</td><td valign="top"><pre>Dokument-Dateinamen mit ''{0}'' getrennt. Wenn mit ''@'' beginnend, Dateiname einer Textdatei mit Dokument-Dateinamen.</pre></td></tr> |
168 | * </table> |
169 | * <li>"{@link #getDocumentsOptionArgNameMessage documentsOptionArgName}"<table> |
170 | * <tr><td valign="top">English:</td><td valign="top"><pre>files</pre></td></tr> |
171 | * <tr><td valign="top">Deutsch:</td><td valign="top"><pre>Dateien</pre></td></tr> |
172 | * </table> |
173 | * <li>"{@link #getInvalidModelMessage invalidModel}"<table> |
174 | * <tr><td valign="top">English:</td><td valign="top"><pre>Invalid model.</pre></td></tr> |
175 | * <tr><td valign="top">Deutsch:</td><td valign="top"><pre>Ungültiges Modell.</pre></td></tr> |
176 | * </table> |
177 | * <li>"{@link #getLongDescriptionMessage longDescription}"<table> |
178 | * <tr><td valign="top">English:</td><td valign="top"><pre></pre></td></tr> |
179 | * <tr><td valign="top">Deutsch:</td><td valign="top"><pre></pre></td></tr> |
180 | * </table> |
181 | * <li>"{@link #getMissingModuleMessage missingModule}"<table> |
182 | * <tr><td valign="top">English:</td><td valign="top"><pre>Module ''{0}'' not found.</pre></td></tr> |
183 | * <tr><td valign="top">Deutsch:</td><td valign="top"><pre>Modul ''{0}'' nicht gefunden.</pre></td></tr> |
184 | * </table> |
185 | * <li>"{@link #getModuleLocationOptionMessage moduleLocationOption}"<table> |
186 | * <tr><td valign="top">English:</td><td valign="top"><pre>Location of classpath modules.</pre></td></tr> |
187 | * <tr><td valign="top">Deutsch:</td><td valign="top"><pre>Ort der Klassenpfad-Module.</pre></td></tr> |
188 | * </table> |
189 | * <li>"{@link #getModuleLocationOptionArgNameMessage moduleLocationOptionArgName}"<table> |
190 | * <tr><td valign="top">English:</td><td valign="top"><pre>location</pre></td></tr> |
191 | * <tr><td valign="top">Deutsch:</td><td valign="top"><pre>Ort</pre></td></tr> |
192 | * </table> |
193 | * <li>"{@link #getModuleNameOptionMessage moduleNameOption}"<table> |
194 | * <tr><td valign="top">English:</td><td valign="top"><pre>Name of the module to process.</pre></td></tr> |
195 | * <tr><td valign="top">Deutsch:</td><td valign="top"><pre>Name des zu verarbeitenden Moduls.</pre></td></tr> |
196 | * </table> |
197 | * <li>"{@link #getModuleNameOptionArgNameMessage moduleNameOptionArgName}"<table> |
198 | * <tr><td valign="top">English:</td><td valign="top"><pre>name</pre></td></tr> |
199 | * <tr><td valign="top">Deutsch:</td><td valign="top"><pre>Name</pre></td></tr> |
200 | * </table> |
201 | * <li>"{@link #getModulesReportMessage modulesReport}"<table> |
202 | * <tr><td valign="top">English:</td><td valign="top"><pre>Modules</pre></td></tr> |
203 | * <tr><td valign="top">Deutsch:</td><td valign="top"><pre>Module</pre></td></tr> |
204 | * </table> |
205 | * <li>"{@link #getNoClasspathResolutionOptionMessage noClasspathResolutionOption}"<table> |
206 | * <tr><td valign="top">English:</td><td valign="top"><pre>Do not perform classpath resolution.</pre></td></tr> |
207 | * <tr><td valign="top">Deutsch:</td><td valign="top"><pre>Keine Klassenpfad-Auflösung durchführen.</pre></td></tr> |
208 | * </table> |
209 | * <li>"{@link #getSeparatorMessage separator}"<table> |
210 | * <tr><td valign="top">English:</td><td valign="top"><pre>--------------------------------------------------------------------------------</pre></td></tr> |
211 | * </table> |
212 | * <li>"{@link #getShortDescriptionMessage shortDescription}"<table> |
213 | * <tr><td valign="top">English:</td><td valign="top"><pre>Does nothing.</pre></td></tr> |
214 | * <tr><td valign="top">Deutsch:</td><td valign="top"><pre>Führt nichts aus.</pre></td></tr> |
215 | * </table> |
216 | * <li>"{@link #getStartingModuleProcessingMessage startingModuleProcessing}"<table> |
217 | * <tr><td valign="top">English:</td><td valign="top"><pre>Executing command {0} with module ''{1}'' ...</pre></td></tr> |
218 | * <tr><td valign="top">Deutsch:</td><td valign="top"><pre>Führt Befehl {0} mit Modul ''{1}'' aus ... </pre></td></tr> |
219 | * </table> |
220 | * <li>"{@link #getStartingProcessingMessage startingProcessing}"<table> |
221 | * <tr><td valign="top">English:</td><td valign="top"><pre>Executing command {0} ...</pre></td></tr> |
222 | * <tr><td valign="top">Deutsch:</td><td valign="top"><pre>Führt Befehl {0} aus ... </pre></td></tr> |
223 | * </table> |
224 | * <li>"{@link #getToolFailureMessage toolFailure}"<table> |
225 | * <tr><td valign="top">English:</td><td valign="top"><pre>{0} failure.</pre></td></tr> |
226 | * <tr><td valign="top">Deutsch:</td><td valign="top"><pre>{0} fehlgeschlagen.</pre></td></tr> |
227 | * </table> |
228 | * <li>"{@link #getToolSuccessMessage toolSuccess}"<table> |
229 | * <tr><td valign="top">English:</td><td valign="top"><pre>{0} successful.</pre></td></tr> |
230 | * <tr><td valign="top">Deutsch:</td><td valign="top"><pre>{0} erfolgreich.</pre></td></tr> |
231 | * </table> |
232 | * </ul></p> |
233 | * |
234 | * @author <a href="mailto:cs@jomc.org">Christian Schulte</a> 1.0 |
235 | * @version $Id: AbstractJomcCommand.java 1346 2010-01-19 12:16:43Z schulte2005 $ |
236 | */ |
237 | // </editor-fold> |
238 | // SECTION-END |
239 | // SECTION-START[Annotations] |
240 | // <editor-fold defaultstate="collapsed" desc=" Generated Annotations "> |
241 | @javax.annotation.Generated( value = "org.jomc.tools.JavaSources", |
242 | comments = "See http://jomc.sourceforge.net/jomc/1.0-alpha-15/jomc-tools" ) |
243 | // </editor-fold> |
244 | // SECTION-END |
245 | public abstract class AbstractJomcCommand implements Command |
246 | { |
247 | // SECTION-START[AbstractJomcCommand] |
248 | |
249 | /** |
250 | * Log level events are logged at by default. |
251 | * @see #getDefaultLogLevel() |
252 | */ |
253 | private static final Level DEFAULT_LOG_LEVEL = Level.WARNING; |
254 | |
255 | /** Default log level. */ |
256 | private static volatile Level defaultLogLevel; |
257 | |
258 | /** 'classpath' option of the instance. */ |
259 | private Option classpathOption; |
260 | |
261 | /** 'documents' option of the instance. */ |
262 | private Option documentsOption; |
263 | |
264 | /** 'module-location' option of the instance. */ |
265 | private Option moduleLocationOption; |
266 | |
267 | /** 'module-name' option of the instance. */ |
268 | private Option moduleNameOption; |
269 | |
270 | /** 'no-classpath-resolution' option of the instance. */ |
271 | private Option noClasspathResolutionOption; |
272 | |
273 | /** The {@code JavaBundles} tool of the instance. */ |
274 | private JavaBundles javaBundles; |
275 | |
276 | /** The {@code JavaClasses} tool of the instance. */ |
277 | private JavaClasses javaClasses; |
278 | |
279 | /** The {@code JavaSources} tool of the instance. */ |
280 | private JavaSources javaSources; |
281 | |
282 | /** The listeners of the instance. */ |
283 | private List<Listener> listeners; |
284 | |
285 | /** Log level of the instance. */ |
286 | private Level logLevel; |
287 | |
288 | /** |
289 | * Gets the list of registered listeners. |
290 | * <p>This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make |
291 | * to the returned list will be present inside the object. This is why there is no {@code set} method for the |
292 | * listeners property.</p> |
293 | * |
294 | * @return The list of registered listeners. |
295 | * |
296 | * @see #log(java.util.logging.Level, java.lang.String, java.lang.Throwable) |
297 | */ |
298 | public List<Listener> getListeners() |
299 | { |
300 | if ( this.listeners == null ) |
301 | { |
302 | this.listeners = new LinkedList<Listener>(); |
303 | } |
304 | |
305 | return this.listeners; |
306 | } |
307 | |
308 | /** |
309 | * Gets the default log level events are logged at. |
310 | * <p>The default log level is controlled by system property |
311 | * {@code org.jomc.cli.command.AbstractJomcCommand.defaultLogLevel} holding the log level to log events at by |
312 | * default. If that property is not set, the {@code WARNING} default is returned.</p> |
313 | * |
314 | * @return The log level events are logged at by default. |
315 | * |
316 | * @see #getLogLevel() |
317 | * @see Level#parse(java.lang.String) |
318 | */ |
319 | public static Level getDefaultLogLevel() |
320 | { |
321 | if ( defaultLogLevel == null ) |
322 | { |
323 | defaultLogLevel = Level.parse( System.getProperty( |
324 | "org.jomc.cli.command.AbstractJomcCommand.defaultLogLevel", DEFAULT_LOG_LEVEL.getName() ) ); |
325 | |
326 | } |
327 | |
328 | return defaultLogLevel; |
329 | } |
330 | |
331 | /** |
332 | * Sets the default log level events are logged at. |
333 | * |
334 | * @param value The new default level events are logged at or {@code null}. |
335 | * |
336 | * @see #getDefaultLogLevel() |
337 | */ |
338 | public static void setDefaultLogLevel( final Level value ) |
339 | { |
340 | defaultLogLevel = value; |
341 | } |
342 | |
343 | /** |
344 | * Gets the log level of the instance. |
345 | * |
346 | * @return The log level of the instance. |
347 | * |
348 | * @see #getDefaultLogLevel() |
349 | * @see #setLogLevel(java.util.logging.Level) |
350 | * @see #isLoggable(java.util.logging.Level) |
351 | */ |
352 | public Level getLogLevel() |
353 | { |
354 | if ( this.logLevel == null ) |
355 | { |
356 | this.logLevel = getDefaultLogLevel(); |
357 | this.log( Level.CONFIG, this.getDefaultLogLevelInfoMessage( |
358 | this.getLocale(), this.logLevel.getLocalizedName() ), null ); |
359 | |
360 | } |
361 | |
362 | return this.logLevel; |
363 | } |
364 | |
365 | /** |
366 | * Sets the log level of the instance. |
367 | * |
368 | * @param value The new log level of the instance or {@code null}. |
369 | * |
370 | * @see #getLogLevel() |
371 | * @see #isLoggable(java.util.logging.Level) |
372 | */ |
373 | public void setLogLevel( final Level value ) |
374 | { |
375 | this.logLevel = value; |
376 | } |
377 | |
378 | public String getName() |
379 | { |
380 | return this.getCommandName(); |
381 | } |
382 | |
383 | public String getAbbreviatedName() |
384 | { |
385 | return this.getAbbreviatedCommandName(); |
386 | } |
387 | |
388 | public String getShortDescription( final Locale locale ) |
389 | { |
390 | return this.getShortDescriptionMessage( locale ); |
391 | } |
392 | |
393 | public String getLongDescription( final Locale locale ) |
394 | { |
395 | return this.getLongDescriptionMessage( locale ); |
396 | } |
397 | |
398 | public Options getOptions() |
399 | { |
400 | final Options options = new Options(); |
401 | options.addOption( this.getClasspathOption() ); |
402 | options.addOption( this.getDocumentsOption() ); |
403 | options.addOption( this.getModuleLocationOption() ); |
404 | options.addOption( this.getModuleNameOption() ); |
405 | options.addOption( this.getNoClasspathResolutionOption() ); |
406 | return options; |
407 | } |
408 | |
409 | public final int execute( final CommandLine commandLine ) |
410 | { |
411 | try |
412 | { |
413 | if ( this.isLoggable( Level.INFO ) ) |
414 | { |
415 | this.log( Level.INFO, this.getSeparatorMessage( this.getLocale() ), null ); |
416 | this.log( Level.INFO, this.getApplicationTitleMessage( this.getLocale() ), null ); |
417 | this.log( Level.INFO, this.getSeparatorMessage( this.getLocale() ), null ); |
418 | } |
419 | |
420 | final int status = this.executeCommand( commandLine ); |
421 | |
422 | if ( this.isLoggable( Level.INFO ) ) |
423 | { |
424 | if ( status == Command.STATUS_SUCCESS ) |
425 | { |
426 | this.log( Level.INFO, this.getToolSuccessMessage( this.getLocale(), this.getCommandName() ), null ); |
427 | } |
428 | else |
429 | { |
430 | this.log( Level.INFO, this.getToolFailureMessage( this.getLocale(), this.getCommandName() ), null ); |
431 | |
432 | } |
433 | |
434 | this.log( Level.INFO, this.getSeparatorMessage( this.getLocale() ), null ); |
435 | } |
436 | |
437 | return status; |
438 | } |
439 | catch ( final Throwable t ) |
440 | { |
441 | this.log( Level.SEVERE, t.getMessage(), t ); |
442 | return Command.STATUS_FAILURE; |
443 | } |
444 | } |
445 | |
446 | protected abstract int executeCommand( final CommandLine commandLine ) throws Exception; |
447 | |
448 | /** |
449 | * Checks if a message at a given level is provided to the listeners of the instance. |
450 | * |
451 | * @param level The level to test. |
452 | * |
453 | * @return {@code true} if messages at {@code level} are provided to the listeners of the instance; |
454 | * {@code false} if messages at {@code level} are not provided to the listeners of the instance. |
455 | * |
456 | * @throws NullPointerException if {@code level} is {@code null}. |
457 | * |
458 | * @see #getLogLevel() |
459 | * @see #setLogLevel(java.util.logging.Level) |
460 | */ |
461 | protected boolean isLoggable( final Level level ) |
462 | { |
463 | if ( level == null ) |
464 | { |
465 | throw new NullPointerException( "level" ); |
466 | } |
467 | |
468 | return level.intValue() >= this.getLogLevel().intValue(); |
469 | } |
470 | |
471 | /** |
472 | * Notifies registered listeners. |
473 | * |
474 | * @param level The level of the event. |
475 | * @param message The message of the event or {@code null}. |
476 | * @param throwable The throwable of the event {@code null}. |
477 | * |
478 | * @throws NullPointerException if {@code level} is {@code null}. |
479 | * |
480 | * @see #getListeners() |
481 | * @see #isLoggable(java.util.logging.Level) |
482 | */ |
483 | protected void log( final Level level, final String message, final Throwable throwable ) |
484 | { |
485 | if ( level == null ) |
486 | { |
487 | throw new NullPointerException( "level" ); |
488 | } |
489 | |
490 | if ( this.isLoggable( level ) ) |
491 | { |
492 | for ( Listener l : this.getListeners() ) |
493 | { |
494 | l.onLog( level, message, throwable ); |
495 | } |
496 | } |
497 | } |
498 | |
499 | protected void log( final ModelValidationReport validationReport, final Marshaller marshaller ) |
500 | throws JAXBException |
501 | { |
502 | if ( !validationReport.isModelValid() && this.isLoggable( Level.SEVERE ) ) |
503 | { |
504 | this.log( Level.SEVERE, this.getInvalidModelMessage( this.getLocale() ), null ); |
505 | } |
506 | |
507 | marshaller.setProperty( Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE ); |
508 | for ( ModelValidationReport.Detail d : validationReport.getDetails() ) |
509 | { |
510 | if ( this.isLoggable( d.getLevel() ) ) |
511 | { |
512 | this.log( d.getLevel(), d.getMessage(), null ); |
513 | |
514 | if ( d.getElement() != null && this.getLogLevel().intValue() < Level.INFO.intValue() ) |
515 | { |
516 | final StringWriter stringWriter = new StringWriter(); |
517 | marshaller.marshal( d.getElement(), stringWriter ); |
518 | this.log( d.getLevel(), stringWriter.toString(), null ); |
519 | } |
520 | } |
521 | } |
522 | } |
523 | |
524 | protected ModelContext getModelContext( final ClassLoader classLoader ) throws ModelException |
525 | { |
526 | final ModelContext modelContext = ModelContext.createModelContext( classLoader ); |
527 | modelContext.setLogLevel( this.getLogLevel() ); |
528 | modelContext.getListeners().add( new ModelContext.Listener() |
529 | { |
530 | |
531 | public void onLog( final Level level, final String message, final Throwable t ) |
532 | { |
533 | log( level, message, t ); |
534 | } |
535 | |
536 | } ); |
537 | |
538 | return modelContext; |
539 | } |
540 | |
541 | protected JavaBundles getJavaBundles() |
542 | { |
543 | if ( this.javaBundles == null ) |
544 | { |
545 | final JavaBundles tool = new JavaBundles(); |
546 | tool.setLogLevel( this.getLogLevel() ); |
547 | tool.getListeners().add( new JomcTool.Listener() |
548 | { |
549 | |
550 | public void onLog( final Level level, final String message, final Throwable throwable ) |
551 | { |
552 | log( level, message, throwable ); |
553 | } |
554 | |
555 | } ); |
556 | |
557 | return tool; |
558 | } |
559 | |
560 | return this.javaBundles; |
561 | } |
562 | |
563 | protected JavaClasses getJavaClasses() |
564 | { |
565 | if ( this.javaClasses == null ) |
566 | { |
567 | final JavaClasses tool = new JavaClasses(); |
568 | tool.setLogLevel( this.getLogLevel() ); |
569 | tool.getListeners().add( new JomcTool.Listener() |
570 | { |
571 | |
572 | public void onLog( final Level level, final String message, final Throwable throwable ) |
573 | { |
574 | log( level, message, throwable ); |
575 | } |
576 | |
577 | } ); |
578 | |
579 | return tool; |
580 | } |
581 | |
582 | return this.javaClasses; |
583 | } |
584 | |
585 | protected JavaSources getJavaSources() |
586 | { |
587 | if ( this.javaSources == null ) |
588 | { |
589 | final JavaSources tool = new JavaSources(); |
590 | tool.setLogLevel( this.getLogLevel() ); |
591 | tool.getListeners().add( new JomcTool.Listener() |
592 | { |
593 | |
594 | public void onLog( final Level level, final String message, final Throwable throwable ) |
595 | { |
596 | log( level, message, throwable ); |
597 | } |
598 | |
599 | } ); |
600 | |
601 | return tool; |
602 | } |
603 | |
604 | return this.javaSources; |
605 | } |
606 | |
607 | protected Option getClasspathOption() |
608 | { |
609 | if ( this.classpathOption == null ) |
610 | { |
611 | this.classpathOption = new Option( this.getClasspathOptionShortName(), this.getClasspathOptionLongName(), |
612 | true, this.getClasspathOptionMessage( this.getLocale(), |
613 | File.pathSeparator ) ); |
614 | |
615 | this.classpathOption.setArgs( Option.UNLIMITED_VALUES ); |
616 | this.classpathOption.setValueSeparator( File.pathSeparatorChar ); |
617 | this.classpathOption.setArgName( this.getClasspathOptionArgNameMessage( this.getLocale() ) ); |
618 | } |
619 | |
620 | return this.classpathOption; |
621 | } |
622 | |
623 | protected Option getDocumentsOption() |
624 | { |
625 | if ( this.documentsOption == null ) |
626 | { |
627 | this.documentsOption = new Option( this.getDocumentsOptionShortName(), this.getDocumentsOptionLongName(), |
628 | true, this.getDocumentsOptionMessage( this.getLocale(), |
629 | File.pathSeparator ) ); |
630 | |
631 | this.documentsOption.setArgs( Option.UNLIMITED_VALUES ); |
632 | this.documentsOption.setValueSeparator( File.pathSeparatorChar ); |
633 | this.documentsOption.setArgName( this.getDocumentsOptionArgNameMessage( this.getLocale() ) ); |
634 | } |
635 | |
636 | return this.documentsOption; |
637 | } |
638 | |
639 | protected Option getModuleLocationOption() |
640 | { |
641 | if ( this.moduleLocationOption == null ) |
642 | { |
643 | this.moduleLocationOption = new Option( this.getModuleLocationOptionShortName(), |
644 | this.getModuleLocationOptionLongName(), true, |
645 | this.getModuleLocationOptionMessage( this.getLocale() ) ); |
646 | |
647 | this.moduleLocationOption.setArgName( this.getModuleLocationOptionArgNameMessage( this.getLocale() ) ); |
648 | } |
649 | |
650 | return this.moduleLocationOption; |
651 | } |
652 | |
653 | protected Option getModuleNameOption() |
654 | { |
655 | if ( this.moduleNameOption == null ) |
656 | { |
657 | this.moduleNameOption = new Option( this.getModuleNameOptionShortName(), |
658 | this.getModuleNameOptionLongName(), |
659 | true, this.getModuleNameOptionMessage( this.getLocale() ) ); |
660 | |
661 | this.moduleNameOption.setArgName( this.getModuleNameOptionArgNameMessage( this.getLocale() ) ); |
662 | } |
663 | |
664 | return this.moduleNameOption; |
665 | } |
666 | |
667 | protected Option getNoClasspathResolutionOption() |
668 | { |
669 | if ( this.noClasspathResolutionOption == null ) |
670 | { |
671 | this.noClasspathResolutionOption = |
672 | new Option( this.getNoClasspathResolutionOptionShortName(), |
673 | this.getNoClasspathResolutionOptionLongName(), false, |
674 | this.getNoClasspathResolutionOptionMessage( this.getLocale() ) ); |
675 | |
676 | } |
677 | |
678 | return this.noClasspathResolutionOption; |
679 | } |
680 | |
681 | protected ClassLoader getClassLoader( final CommandLine commandLine ) throws IOException |
682 | { |
683 | final Set<URI> uris = new HashSet<URI>(); |
684 | |
685 | if ( commandLine.hasOption( this.getClasspathOption().getOpt() ) ) |
686 | { |
687 | final String[] elements = commandLine.getOptionValues( this.getClasspathOption().getOpt() ); |
688 | if ( elements != null ) |
689 | { |
690 | for ( String e : elements ) |
691 | { |
692 | if ( this.isLoggable( Level.FINE ) ) |
693 | { |
694 | this.log( Level.FINE, this.getClasspathElementMessage( this.getLocale(), e ), null ); |
695 | } |
696 | |
697 | if ( e.startsWith( "@" ) ) |
698 | { |
699 | String line = null; |
700 | final File file = new File( e.substring( 1 ) ); |
701 | BufferedReader reader = null; |
702 | |
703 | try |
704 | { |
705 | reader = new BufferedReader( new FileReader( file ) ); |
706 | while ( ( line = reader.readLine() ) != null ) |
707 | { |
708 | if ( !line.startsWith( "#" ) ) |
709 | { |
710 | uris.add( new File( line ).toURI() ); |
711 | } |
712 | } |
713 | } |
714 | finally |
715 | { |
716 | if ( reader != null ) |
717 | { |
718 | reader.close(); |
719 | } |
720 | } |
721 | } |
722 | else |
723 | { |
724 | uris.add( new File( e ).toURI() ); |
725 | } |
726 | } |
727 | } |
728 | } |
729 | |
730 | int i = 0; |
731 | final URL[] urls = new URL[ uris.size() ]; |
732 | for ( URI uri : uris ) |
733 | { |
734 | urls[i++] = uri.toURL(); |
735 | } |
736 | |
737 | return new URLClassLoader( urls ); |
738 | } |
739 | |
740 | protected Set<File> getDocumentFiles( final CommandLine commandLine ) throws IOException |
741 | { |
742 | final Set<File> files = new HashSet<File>(); |
743 | |
744 | if ( commandLine.hasOption( this.getDocumentsOption().getOpt() ) ) |
745 | { |
746 | final String[] elements = commandLine.getOptionValues( this.getDocumentsOption().getOpt() ); |
747 | if ( elements != null ) |
748 | { |
749 | for ( String e : elements ) |
750 | { |
751 | if ( this.isLoggable( Level.FINE ) ) |
752 | { |
753 | this.log( Level.FINE, this.getDocumentFileMessage( this.getLocale(), e ), null ); |
754 | } |
755 | |
756 | if ( e.startsWith( "@" ) ) |
757 | { |
758 | String line = null; |
759 | final File file = new File( e.substring( 1 ) ); |
760 | BufferedReader reader = null; |
761 | |
762 | try |
763 | { |
764 | reader = new BufferedReader( new FileReader( file ) ); |
765 | while ( ( line = reader.readLine() ) != null ) |
766 | { |
767 | if ( !line.startsWith( "#" ) ) |
768 | { |
769 | files.add( new File( line ) ); |
770 | } |
771 | } |
772 | } |
773 | finally |
774 | { |
775 | if ( reader != null ) |
776 | { |
777 | reader.close(); |
778 | } |
779 | } |
780 | } |
781 | else |
782 | { |
783 | files.add( new File( e ) ); |
784 | } |
785 | } |
786 | } |
787 | } |
788 | |
789 | return files; |
790 | } |
791 | |
792 | protected Modules getModules( final CommandLine commandLine ) |
793 | throws IOException, SAXException, JAXBException, ModelException |
794 | { |
795 | final ClassLoader classLoader = this.getClassLoader( commandLine ); |
796 | final ModelContext context = this.getModelContext( classLoader ); |
797 | final Modules modules = new Modules(); |
798 | |
799 | if ( commandLine.hasOption( this.getDocumentsOption().getOpt() ) ) |
800 | { |
801 | final Unmarshaller u = context.createUnmarshaller(); |
802 | for ( File f : this.getDocumentFiles( commandLine ) ) |
803 | { |
804 | final InputStream in = new FileInputStream( f ); |
805 | Object o = u.unmarshal( new StreamSource( in ) ); |
806 | if ( o instanceof JAXBElement ) |
807 | { |
808 | o = ( (JAXBElement) o ).getValue(); |
809 | } |
810 | |
811 | in.close(); |
812 | |
813 | if ( o instanceof Module ) |
814 | { |
815 | modules.getModule().add( (Module) o ); |
816 | } |
817 | else if ( o instanceof Modules ) |
818 | { |
819 | modules.getModule().addAll( ( (Modules) o ).getModule() ); |
820 | } |
821 | else if ( this.isLoggable( Level.WARNING ) ) |
822 | { |
823 | this.log( Level.WARNING, this.getCannotProcessMessage( |
824 | this.getLocale(), f.getAbsolutePath(), o.toString() ), null ); |
825 | |
826 | } |
827 | } |
828 | } |
829 | |
830 | if ( commandLine.hasOption( this.getClasspathOption().getOpt() ) ) |
831 | { |
832 | if ( commandLine.hasOption( this.getModuleLocationOption().getOpt() ) ) |
833 | { |
834 | DefaultModelProvider.setDefaultModuleLocation( |
835 | commandLine.getOptionValue( this.getModuleLocationOption().getOpt() ) ); |
836 | |
837 | } |
838 | else |
839 | { |
840 | DefaultModelProvider.setDefaultModuleLocation( null ); |
841 | } |
842 | |
843 | final Modules classpathModules = context.findModules(); |
844 | for ( Module m : classpathModules.getModule() ) |
845 | { |
846 | if ( modules.getModule( m.getName() ) == null ) |
847 | { |
848 | modules.getModule().add( m ); |
849 | } |
850 | } |
851 | } |
852 | |
853 | if ( !commandLine.hasOption( this.getNoClasspathResolutionOption().getOpt() ) ) |
854 | { |
855 | final Module classpathModule = modules.getClasspathModule( |
856 | Modules.getDefaultClasspathModuleName(), classLoader ); |
857 | |
858 | if ( classpathModule != null ) |
859 | { |
860 | modules.getModule().add( classpathModule ); |
861 | } |
862 | } |
863 | |
864 | if ( this.isLoggable( Level.FINE ) ) |
865 | { |
866 | this.log( Level.FINE, this.getModulesReportMessage( this.getLocale() ), null ); |
867 | for ( Module m : modules.getModule() ) |
868 | { |
869 | this.log( Level.FINE, "\t" + m.getName(), null ); |
870 | } |
871 | } |
872 | |
873 | return modules; |
874 | } |
875 | |
876 | // SECTION-END |
877 | // SECTION-START[Constructors] |
878 | // <editor-fold defaultstate="collapsed" desc=" Generated Constructors "> |
879 | |
880 | /** Creates a new {@code AbstractJomcCommand} instance. */ |
881 | @javax.annotation.Generated( value = "org.jomc.tools.JavaSources", |
882 | comments = "See http://jomc.sourceforge.net/jomc/1.0-alpha-15/jomc-tools" ) |
883 | public AbstractJomcCommand() |
884 | { |
885 | // SECTION-START[Default Constructor] |
886 | super(); |
887 | // SECTION-END |
888 | } |
889 | // </editor-fold> |
890 | // SECTION-END |
891 | // SECTION-START[Dependencies] |
892 | // <editor-fold defaultstate="collapsed" desc=" Generated Dependencies "> |
893 | |
894 | /** |
895 | * Gets the {@code Locale} dependency. |
896 | * <p>This method returns the "{@code default}" object of the {@code java.util.Locale} specification at specification level 1.1.</p> |
897 | * <p>That specification does not apply to any scope. A new object is returned whenever requested and bound to this instance.</p> |
898 | * @return The {@code Locale} dependency. |
899 | * @throws org.jomc.ObjectManagementException if getting the dependency instance fails. |
900 | */ |
901 | @javax.annotation.Generated( value = "org.jomc.tools.JavaSources", |
902 | comments = "See http://jomc.sourceforge.net/jomc/1.0-alpha-15/jomc-tools" ) |
903 | private java.util.Locale getLocale() |
904 | { |
905 | final java.util.Locale _d = (java.util.Locale) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "Locale" ); |
906 | assert _d != null : "'Locale' dependency not found."; |
907 | return _d; |
908 | } |
909 | // </editor-fold> |
910 | // SECTION-END |
911 | // SECTION-START[Properties] |
912 | // <editor-fold defaultstate="collapsed" desc=" Generated Properties "> |
913 | |
914 | /** |
915 | * Gets the value of the {@code abbreviatedCommandName} property. |
916 | * @return Abbreviated name of the command. |
917 | * @throws org.jomc.ObjectManagementException if getting the property instance fails. |
918 | */ |
919 | @javax.annotation.Generated( value = "org.jomc.tools.JavaSources", |
920 | comments = "See http://jomc.sourceforge.net/jomc/1.0-alpha-15/jomc-tools" ) |
921 | private java.lang.String getAbbreviatedCommandName() |
922 | { |
923 | final java.lang.String _p = (java.lang.String) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getProperty( this, "abbreviatedCommandName" ); |
924 | assert _p != null : "'abbreviatedCommandName' property not found."; |
925 | return _p; |
926 | } |
927 | |
928 | /** |
929 | * Gets the value of the {@code classpathOptionLongName} property. |
930 | * @return Long name of the 'classpath' option. |
931 | * @throws org.jomc.ObjectManagementException if getting the property instance fails. |
932 | */ |
933 | @javax.annotation.Generated( value = "org.jomc.tools.JavaSources", |
934 | comments = "See http://jomc.sourceforge.net/jomc/1.0-alpha-15/jomc-tools" ) |
935 | private java.lang.String getClasspathOptionLongName() |
936 | { |
937 | final java.lang.String _p = (java.lang.String) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getProperty( this, "classpathOptionLongName" ); |
938 | assert _p != null : "'classpathOptionLongName' property not found."; |
939 | return _p; |
940 | } |
941 | |
942 | /** |
943 | * Gets the value of the {@code classpathOptionShortName} property. |
944 | * @return Name of the 'classpath' option. |
945 | * @throws org.jomc.ObjectManagementException if getting the property instance fails. |
946 | */ |
947 | @javax.annotation.Generated( value = "org.jomc.tools.JavaSources", |
948 | comments = "See http://jomc.sourceforge.net/jomc/1.0-alpha-15/jomc-tools" ) |
949 | private java.lang.String getClasspathOptionShortName() |
950 | { |
951 | final java.lang.String _p = (java.lang.String) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getProperty( this, "classpathOptionShortName" ); |
952 | assert _p != null : "'classpathOptionShortName' property not found."; |
953 | return _p; |
954 | } |
955 | |
956 | /** |
957 | * Gets the value of the {@code commandName} property. |
958 | * @return Name of the command. |
959 | * @throws org.jomc.ObjectManagementException if getting the property instance fails. |
960 | */ |
961 | @javax.annotation.Generated( value = "org.jomc.tools.JavaSources", |
962 | comments = "See http://jomc.sourceforge.net/jomc/1.0-alpha-15/jomc-tools" ) |
963 | private java.lang.String getCommandName() |
964 | { |
965 | final java.lang.String _p = (java.lang.String) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getProperty( this, "commandName" ); |
966 | assert _p != null : "'commandName' property not found."; |
967 | return _p; |
968 | } |
969 | |
970 | /** |
971 | * Gets the value of the {@code documentsOptionLongName} property. |
972 | * @return Long name of the 'documents' option. |
973 | * @throws org.jomc.ObjectManagementException if getting the property instance fails. |
974 | */ |
975 | @javax.annotation.Generated( value = "org.jomc.tools.JavaSources", |
976 | comments = "See http://jomc.sourceforge.net/jomc/1.0-alpha-15/jomc-tools" ) |
977 | private java.lang.String getDocumentsOptionLongName() |
978 | { |
979 | final java.lang.String _p = (java.lang.String) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getProperty( this, "documentsOptionLongName" ); |
980 | assert _p != null : "'documentsOptionLongName' property not found."; |
981 | return _p; |
982 | } |
983 | |
984 | /** |
985 | * Gets the value of the {@code documentsOptionShortName} property. |
986 | * @return Name of the 'documents' option. |
987 | * @throws org.jomc.ObjectManagementException if getting the property instance fails. |
988 | */ |
989 | @javax.annotation.Generated( value = "org.jomc.tools.JavaSources", |
990 | comments = "See http://jomc.sourceforge.net/jomc/1.0-alpha-15/jomc-tools" ) |
991 | private java.lang.String getDocumentsOptionShortName() |
992 | { |
993 | final java.lang.String _p = (java.lang.String) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getProperty( this, "documentsOptionShortName" ); |
994 | assert _p != null : "'documentsOptionShortName' property not found."; |
995 | return _p; |
996 | } |
997 | |
998 | /** |
999 | * Gets the value of the {@code moduleLocationOptionLongName} property. |
1000 | * @return Long name of the 'module-location' option. |
1001 | * @throws org.jomc.ObjectManagementException if getting the property instance fails. |
1002 | */ |
1003 | @javax.annotation.Generated( value = "org.jomc.tools.JavaSources", |
1004 | comments = "See http://jomc.sourceforge.net/jomc/1.0-alpha-15/jomc-tools" ) |
1005 | private java.lang.String getModuleLocationOptionLongName() |
1006 | { |
1007 | final java.lang.String _p = (java.lang.String) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getProperty( this, "moduleLocationOptionLongName" ); |
1008 | assert _p != null : "'moduleLocationOptionLongName' property not found."; |
1009 | return _p; |
1010 | } |
1011 | |
1012 | /** |
1013 | * Gets the value of the {@code moduleLocationOptionShortName} property. |
1014 | * @return Name of the 'module-location' option. |
1015 | * @throws org.jomc.ObjectManagementException if getting the property instance fails. |
1016 | */ |
1017 | @javax.annotation.Generated( value = "org.jomc.tools.JavaSources", |
1018 | comments = "See http://jomc.sourceforge.net/jomc/1.0-alpha-15/jomc-tools" ) |
1019 | private java.lang.String getModuleLocationOptionShortName() |
1020 | { |
1021 | final java.lang.String _p = (java.lang.String) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getProperty( this, "moduleLocationOptionShortName" ); |
1022 | assert _p != null : "'moduleLocationOptionShortName' property not found."; |
1023 | return _p; |
1024 | } |
1025 | |
1026 | /** |
1027 | * Gets the value of the {@code moduleNameOptionLongName} property. |
1028 | * @return Long name of the 'module' option. |
1029 | * @throws org.jomc.ObjectManagementException if getting the property instance fails. |
1030 | */ |
1031 | @javax.annotation.Generated( value = "org.jomc.tools.JavaSources", |
1032 | comments = "See http://jomc.sourceforge.net/jomc/1.0-alpha-15/jomc-tools" ) |
1033 | private java.lang.String getModuleNameOptionLongName() |
1034 | { |
1035 | final java.lang.String _p = (java.lang.String) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getProperty( this, "moduleNameOptionLongName" ); |
1036 | assert _p != null : "'moduleNameOptionLongName' property not found."; |
1037 | return _p; |
1038 | } |
1039 | |
1040 | /** |
1041 | * Gets the value of the {@code moduleNameOptionShortName} property. |
1042 | * @return Name of the 'module' option. |
1043 | * @throws org.jomc.ObjectManagementException if getting the property instance fails. |
1044 | */ |
1045 | @javax.annotation.Generated( value = "org.jomc.tools.JavaSources", |
1046 | comments = "See http://jomc.sourceforge.net/jomc/1.0-alpha-15/jomc-tools" ) |
1047 | private java.lang.String getModuleNameOptionShortName() |
1048 | { |
1049 | final java.lang.String _p = (java.lang.String) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getProperty( this, "moduleNameOptionShortName" ); |
1050 | assert _p != null : "'moduleNameOptionShortName' property not found."; |
1051 | return _p; |
1052 | } |
1053 | |
1054 | /** |
1055 | * Gets the value of the {@code noClasspathResolutionOptionLongName} property. |
1056 | * @return Long name of the 'no-classpath-resolution' option. |
1057 | * @throws org.jomc.ObjectManagementException if getting the property instance fails. |
1058 | */ |
1059 | @javax.annotation.Generated( value = "org.jomc.tools.JavaSources", |
1060 | comments = "See http://jomc.sourceforge.net/jomc/1.0-alpha-15/jomc-tools" ) |
1061 | private java.lang.String getNoClasspathResolutionOptionLongName() |
1062 | { |
1063 | final java.lang.String _p = (java.lang.String) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getProperty( this, "noClasspathResolutionOptionLongName" ); |
1064 | assert _p != null : "'noClasspathResolutionOptionLongName' property not found."; |
1065 | return _p; |
1066 | } |
1067 | |
1068 | /** |
1069 | * Gets the value of the {@code noClasspathResolutionOptionShortName} property. |
1070 | * @return Name of the 'no-classpath-resolution' option. |
1071 | * @throws org.jomc.ObjectManagementException if getting the property instance fails. |
1072 | */ |
1073 | @javax.annotation.Generated( value = "org.jomc.tools.JavaSources", |
1074 | comments = "See http://jomc.sourceforge.net/jomc/1.0-alpha-15/jomc-tools" ) |
1075 | private java.lang.String getNoClasspathResolutionOptionShortName() |
1076 | { |
1077 | final java.lang.String _p = (java.lang.String) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getProperty( this, "noClasspathResolutionOptionShortName" ); |
1078 | assert _p != null : "'noClasspathResolutionOptionShortName' property not found."; |
1079 | return _p; |
1080 | } |
1081 | // </editor-fold> |
1082 | // SECTION-END |
1083 | // SECTION-START[Messages] |
1084 | // <editor-fold defaultstate="collapsed" desc=" Generated Messages "> |
1085 | |
1086 | /** |
1087 | * Gets the text of the {@code applicationTitle} message. |
1088 | * <p><b>Templates</b><br/><table> |
1089 | * <tr><td valign="top">English:</td><td valign="top"><pre>JOMC Version 1.0-alpha-15 Build 2010-01-19T12:08:03+0000</pre></td></tr> |
1090 | * </table></p> |
1091 | * @param locale The locale of the message to return. |
1092 | * @return The text of the {@code applicationTitle} message. |
1093 | * |
1094 | * @throws org.jomc.ObjectManagementException if getting the message instance fails. |
1095 | */ |
1096 | @javax.annotation.Generated( value = "org.jomc.tools.JavaSources", |
1097 | comments = "See http://jomc.sourceforge.net/jomc/1.0-alpha-15/jomc-tools" ) |
1098 | private String getApplicationTitleMessage( final java.util.Locale locale ) |
1099 | { |
1100 | final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "applicationTitle", locale ); |
1101 | assert _m != null : "'applicationTitle' message not found."; |
1102 | return _m; |
1103 | } |
1104 | |
1105 | /** |
1106 | * Gets the text of the {@code cannotProcess} message. |
1107 | * <p><b>Templates</b><br/><table> |
1108 | * <tr><td valign="top">English:</td><td valign="top"><pre>Cannot process ''{0}'': {1}</pre></td></tr> |
1109 | * <tr><td valign="top">Deutsch:</td><td valign="top"><pre>Kann ''{0}'' nicht verarbeiten: {1}</pre></td></tr> |
1110 | * </table></p> |
1111 | * @param locale The locale of the message to return. |
1112 | * @param itemInfo Format argument. |
1113 | * @param detailMessage Format argument. |
1114 | * @return The text of the {@code cannotProcess} message. |
1115 | * |
1116 | * @throws org.jomc.ObjectManagementException if getting the message instance fails. |
1117 | */ |
1118 | @javax.annotation.Generated( value = "org.jomc.tools.JavaSources", |
1119 | comments = "See http://jomc.sourceforge.net/jomc/1.0-alpha-15/jomc-tools" ) |
1120 | private String getCannotProcessMessage( final java.util.Locale locale, final java.lang.String itemInfo, final java.lang.String detailMessage ) |
1121 | { |
1122 | final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "cannotProcess", locale, itemInfo, detailMessage ); |
1123 | assert _m != null : "'cannotProcess' message not found."; |
1124 | return _m; |
1125 | } |
1126 | |
1127 | /** |
1128 | * Gets the text of the {@code classpathElement} message. |
1129 | * <p><b>Templates</b><br/><table> |
1130 | * <tr><td valign="top">English:</td><td valign="top"><pre>Classpath element: ''{0}''</pre></td></tr> |
1131 | * <tr><td valign="top">Deutsch:</td><td valign="top"><pre>Klassenpfad-Element: ''{0}''</pre></td></tr> |
1132 | * </table></p> |
1133 | * @param locale The locale of the message to return. |
1134 | * @param classpathElement Format argument. |
1135 | * @return The text of the {@code classpathElement} message. |
1136 | * |
1137 | * @throws org.jomc.ObjectManagementException if getting the message instance fails. |
1138 | */ |
1139 | @javax.annotation.Generated( value = "org.jomc.tools.JavaSources", |
1140 | comments = "See http://jomc.sourceforge.net/jomc/1.0-alpha-15/jomc-tools" ) |
1141 | private String getClasspathElementMessage( final java.util.Locale locale, final java.lang.String classpathElement ) |
1142 | { |
1143 | final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "classpathElement", locale, classpathElement ); |
1144 | assert _m != null : "'classpathElement' message not found."; |
1145 | return _m; |
1146 | } |
1147 | |
1148 | /** |
1149 | * Gets the text of the {@code classpathOption} message. |
1150 | * <p><b>Templates</b><br/><table> |
1151 | * <tr><td valign="top">English:</td><td valign="top"><pre>Classpath elements separated by ''{0}''. If starting with a ''@'' character, a file name of a file holding classpath elements.</pre></td></tr> |
1152 | * <tr><td valign="top">Deutsch:</td><td valign="top"><pre>Klassenpfad-Elemente mit ''{0}'' getrennt. Wenn mit ''@'' beginnend, Dateiname einer Textdatei mit Klassenpfad-Elementen.</pre></td></tr> |
1153 | * </table></p> |
1154 | * @param locale The locale of the message to return. |
1155 | * @param pathSeparator Format argument. |
1156 | * @return The text of the {@code classpathOption} message. |
1157 | * |
1158 | * @throws org.jomc.ObjectManagementException if getting the message instance fails. |
1159 | */ |
1160 | @javax.annotation.Generated( value = "org.jomc.tools.JavaSources", |
1161 | comments = "See http://jomc.sourceforge.net/jomc/1.0-alpha-15/jomc-tools" ) |
1162 | private String getClasspathOptionMessage( final java.util.Locale locale, final java.lang.String pathSeparator ) |
1163 | { |
1164 | final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "classpathOption", locale, pathSeparator ); |
1165 | assert _m != null : "'classpathOption' message not found."; |
1166 | return _m; |
1167 | } |
1168 | |
1169 | /** |
1170 | * Gets the text of the {@code classpathOptionArgName} message. |
1171 | * <p><b>Templates</b><br/><table> |
1172 | * <tr><td valign="top">English:</td><td valign="top"><pre>elements</pre></td></tr> |
1173 | * <tr><td valign="top">Deutsch:</td><td valign="top"><pre>Elemente</pre></td></tr> |
1174 | * </table></p> |
1175 | * @param locale The locale of the message to return. |
1176 | * @return The text of the {@code classpathOptionArgName} message. |
1177 | * |
1178 | * @throws org.jomc.ObjectManagementException if getting the message instance fails. |
1179 | */ |
1180 | @javax.annotation.Generated( value = "org.jomc.tools.JavaSources", |
1181 | comments = "See http://jomc.sourceforge.net/jomc/1.0-alpha-15/jomc-tools" ) |
1182 | private String getClasspathOptionArgNameMessage( final java.util.Locale locale ) |
1183 | { |
1184 | final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "classpathOptionArgName", locale ); |
1185 | assert _m != null : "'classpathOptionArgName' message not found."; |
1186 | return _m; |
1187 | } |
1188 | |
1189 | /** |
1190 | * Gets the text of the {@code defaultLogLevelInfo} message. |
1191 | * <p><b>Templates</b><br/><table> |
1192 | * <tr><td valign="top">English:</td><td valign="top"><pre>Default log level: ''{0}''</pre></td></tr> |
1193 | * <tr><td valign="top">Deutsch:</td><td valign="top"><pre>Standard-Protokollierungsstufe: ''{0}''</pre></td></tr> |
1194 | * </table></p> |
1195 | * @param locale The locale of the message to return. |
1196 | * @param defaultLogLevel Format argument. |
1197 | * @return The text of the {@code defaultLogLevelInfo} message. |
1198 | * |
1199 | * @throws org.jomc.ObjectManagementException if getting the message instance fails. |
1200 | */ |
1201 | @javax.annotation.Generated( value = "org.jomc.tools.JavaSources", |
1202 | comments = "See http://jomc.sourceforge.net/jomc/1.0-alpha-15/jomc-tools" ) |
1203 | private String getDefaultLogLevelInfoMessage( final java.util.Locale locale, final java.lang.String defaultLogLevel ) |
1204 | { |
1205 | final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "defaultLogLevelInfo", locale, defaultLogLevel ); |
1206 | assert _m != null : "'defaultLogLevelInfo' message not found."; |
1207 | return _m; |
1208 | } |
1209 | |
1210 | /** |
1211 | * Gets the text of the {@code documentFile} message. |
1212 | * <p><b>Templates</b><br/><table> |
1213 | * <tr><td valign="top">English:</td><td valign="top"><pre>Document file: ''{0}''</pre></td></tr> |
1214 | * <tr><td valign="top">Deutsch:</td><td valign="top"><pre>Dokument-Datei: ''{0}''</pre></td></tr> |
1215 | * </table></p> |
1216 | * @param locale The locale of the message to return. |
1217 | * @param documentFile Format argument. |
1218 | * @return The text of the {@code documentFile} message. |
1219 | * |
1220 | * @throws org.jomc.ObjectManagementException if getting the message instance fails. |
1221 | */ |
1222 | @javax.annotation.Generated( value = "org.jomc.tools.JavaSources", |
1223 | comments = "See http://jomc.sourceforge.net/jomc/1.0-alpha-15/jomc-tools" ) |
1224 | private String getDocumentFileMessage( final java.util.Locale locale, final java.lang.String documentFile ) |
1225 | { |
1226 | final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "documentFile", locale, documentFile ); |
1227 | assert _m != null : "'documentFile' message not found."; |
1228 | return _m; |
1229 | } |
1230 | |
1231 | /** |
1232 | * Gets the text of the {@code documentsOption} message. |
1233 | * <p><b>Templates</b><br/><table> |
1234 | * <tr><td valign="top">English:</td><td valign="top"><pre>Document filenames separated by ''{0}''. If starting with a ''@'' character, a file name of a file holding document filenames.</pre></td></tr> |
1235 | * <tr><td valign="top">Deutsch:</td><td valign="top"><pre>Dokument-Dateinamen mit ''{0}'' getrennt. Wenn mit ''@'' beginnend, Dateiname einer Textdatei mit Dokument-Dateinamen.</pre></td></tr> |
1236 | * </table></p> |
1237 | * @param locale The locale of the message to return. |
1238 | * @param pathSeparator Format argument. |
1239 | * @return The text of the {@code documentsOption} message. |
1240 | * |
1241 | * @throws org.jomc.ObjectManagementException if getting the message instance fails. |
1242 | */ |
1243 | @javax.annotation.Generated( value = "org.jomc.tools.JavaSources", |
1244 | comments = "See http://jomc.sourceforge.net/jomc/1.0-alpha-15/jomc-tools" ) |
1245 | private String getDocumentsOptionMessage( final java.util.Locale locale, final java.lang.String pathSeparator ) |
1246 | { |
1247 | final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "documentsOption", locale, pathSeparator ); |
1248 | assert _m != null : "'documentsOption' message not found."; |
1249 | return _m; |
1250 | } |
1251 | |
1252 | /** |
1253 | * Gets the text of the {@code documentsOptionArgName} message. |
1254 | * <p><b>Templates</b><br/><table> |
1255 | * <tr><td valign="top">English:</td><td valign="top"><pre>files</pre></td></tr> |
1256 | * <tr><td valign="top">Deutsch:</td><td valign="top"><pre>Dateien</pre></td></tr> |
1257 | * </table></p> |
1258 | * @param locale The locale of the message to return. |
1259 | * @return The text of the {@code documentsOptionArgName} message. |
1260 | * |
1261 | * @throws org.jomc.ObjectManagementException if getting the message instance fails. |
1262 | */ |
1263 | @javax.annotation.Generated( value = "org.jomc.tools.JavaSources", |
1264 | comments = "See http://jomc.sourceforge.net/jomc/1.0-alpha-15/jomc-tools" ) |
1265 | private String getDocumentsOptionArgNameMessage( final java.util.Locale locale ) |
1266 | { |
1267 | final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "documentsOptionArgName", locale ); |
1268 | assert _m != null : "'documentsOptionArgName' message not found."; |
1269 | return _m; |
1270 | } |
1271 | |
1272 | /** |
1273 | * Gets the text of the {@code invalidModel} message. |
1274 | * <p><b>Templates</b><br/><table> |
1275 | * <tr><td valign="top">English:</td><td valign="top"><pre>Invalid model.</pre></td></tr> |
1276 | * <tr><td valign="top">Deutsch:</td><td valign="top"><pre>Ungültiges Modell.</pre></td></tr> |
1277 | * </table></p> |
1278 | * @param locale The locale of the message to return. |
1279 | * @return The text of the {@code invalidModel} message. |
1280 | * |
1281 | * @throws org.jomc.ObjectManagementException if getting the message instance fails. |
1282 | */ |
1283 | @javax.annotation.Generated( value = "org.jomc.tools.JavaSources", |
1284 | comments = "See http://jomc.sourceforge.net/jomc/1.0-alpha-15/jomc-tools" ) |
1285 | private String getInvalidModelMessage( final java.util.Locale locale ) |
1286 | { |
1287 | final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "invalidModel", locale ); |
1288 | assert _m != null : "'invalidModel' message not found."; |
1289 | return _m; |
1290 | } |
1291 | |
1292 | /** |
1293 | * Gets the text of the {@code longDescription} message. |
1294 | * <p><b>Templates</b><br/><table> |
1295 | * <tr><td valign="top">English:</td><td valign="top"><pre></pre></td></tr> |
1296 | * <tr><td valign="top">Deutsch:</td><td valign="top"><pre></pre></td></tr> |
1297 | * </table></p> |
1298 | * @param locale The locale of the message to return. |
1299 | * @return The text of the {@code longDescription} message. |
1300 | * |
1301 | * @throws org.jomc.ObjectManagementException if getting the message instance fails. |
1302 | */ |
1303 | @javax.annotation.Generated( value = "org.jomc.tools.JavaSources", |
1304 | comments = "See http://jomc.sourceforge.net/jomc/1.0-alpha-15/jomc-tools" ) |
1305 | private String getLongDescriptionMessage( final java.util.Locale locale ) |
1306 | { |
1307 | final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "longDescription", locale ); |
1308 | assert _m != null : "'longDescription' message not found."; |
1309 | return _m; |
1310 | } |
1311 | |
1312 | /** |
1313 | * Gets the text of the {@code missingModule} message. |
1314 | * <p><b>Templates</b><br/><table> |
1315 | * <tr><td valign="top">English:</td><td valign="top"><pre>Module ''{0}'' not found.</pre></td></tr> |
1316 | * <tr><td valign="top">Deutsch:</td><td valign="top"><pre>Modul ''{0}'' nicht gefunden.</pre></td></tr> |
1317 | * </table></p> |
1318 | * @param locale The locale of the message to return. |
1319 | * @param moduleName Format argument. |
1320 | * @return The text of the {@code missingModule} message. |
1321 | * |
1322 | * @throws org.jomc.ObjectManagementException if getting the message instance fails. |
1323 | */ |
1324 | @javax.annotation.Generated( value = "org.jomc.tools.JavaSources", |
1325 | comments = "See http://jomc.sourceforge.net/jomc/1.0-alpha-15/jomc-tools" ) |
1326 | private String getMissingModuleMessage( final java.util.Locale locale, final java.lang.String moduleName ) |
1327 | { |
1328 | final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "missingModule", locale, moduleName ); |
1329 | assert _m != null : "'missingModule' message not found."; |
1330 | return _m; |
1331 | } |
1332 | |
1333 | /** |
1334 | * Gets the text of the {@code moduleLocationOption} message. |
1335 | * <p><b>Templates</b><br/><table> |
1336 | * <tr><td valign="top">English:</td><td valign="top"><pre>Location of classpath modules.</pre></td></tr> |
1337 | * <tr><td valign="top">Deutsch:</td><td valign="top"><pre>Ort der Klassenpfad-Module.</pre></td></tr> |
1338 | * </table></p> |
1339 | * @param locale The locale of the message to return. |
1340 | * @return The text of the {@code moduleLocationOption} message. |
1341 | * |
1342 | * @throws org.jomc.ObjectManagementException if getting the message instance fails. |
1343 | */ |
1344 | @javax.annotation.Generated( value = "org.jomc.tools.JavaSources", |
1345 | comments = "See http://jomc.sourceforge.net/jomc/1.0-alpha-15/jomc-tools" ) |
1346 | private String getModuleLocationOptionMessage( final java.util.Locale locale ) |
1347 | { |
1348 | final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "moduleLocationOption", locale ); |
1349 | assert _m != null : "'moduleLocationOption' message not found."; |
1350 | return _m; |
1351 | } |
1352 | |
1353 | /** |
1354 | * Gets the text of the {@code moduleLocationOptionArgName} message. |
1355 | * <p><b>Templates</b><br/><table> |
1356 | * <tr><td valign="top">English:</td><td valign="top"><pre>location</pre></td></tr> |
1357 | * <tr><td valign="top">Deutsch:</td><td valign="top"><pre>Ort</pre></td></tr> |
1358 | * </table></p> |
1359 | * @param locale The locale of the message to return. |
1360 | * @return The text of the {@code moduleLocationOptionArgName} message. |
1361 | * |
1362 | * @throws org.jomc.ObjectManagementException if getting the message instance fails. |
1363 | */ |
1364 | @javax.annotation.Generated( value = "org.jomc.tools.JavaSources", |
1365 | comments = "See http://jomc.sourceforge.net/jomc/1.0-alpha-15/jomc-tools" ) |
1366 | private String getModuleLocationOptionArgNameMessage( final java.util.Locale locale ) |
1367 | { |
1368 | final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "moduleLocationOptionArgName", locale ); |
1369 | assert _m != null : "'moduleLocationOptionArgName' message not found."; |
1370 | return _m; |
1371 | } |
1372 | |
1373 | /** |
1374 | * Gets the text of the {@code moduleNameOption} message. |
1375 | * <p><b>Templates</b><br/><table> |
1376 | * <tr><td valign="top">English:</td><td valign="top"><pre>Name of the module to process.</pre></td></tr> |
1377 | * <tr><td valign="top">Deutsch:</td><td valign="top"><pre>Name des zu verarbeitenden Moduls.</pre></td></tr> |
1378 | * </table></p> |
1379 | * @param locale The locale of the message to return. |
1380 | * @return The text of the {@code moduleNameOption} message. |
1381 | * |
1382 | * @throws org.jomc.ObjectManagementException if getting the message instance fails. |
1383 | */ |
1384 | @javax.annotation.Generated( value = "org.jomc.tools.JavaSources", |
1385 | comments = "See http://jomc.sourceforge.net/jomc/1.0-alpha-15/jomc-tools" ) |
1386 | private String getModuleNameOptionMessage( final java.util.Locale locale ) |
1387 | { |
1388 | final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "moduleNameOption", locale ); |
1389 | assert _m != null : "'moduleNameOption' message not found."; |
1390 | return _m; |
1391 | } |
1392 | |
1393 | /** |
1394 | * Gets the text of the {@code moduleNameOptionArgName} message. |
1395 | * <p><b>Templates</b><br/><table> |
1396 | * <tr><td valign="top">English:</td><td valign="top"><pre>name</pre></td></tr> |
1397 | * <tr><td valign="top">Deutsch:</td><td valign="top"><pre>Name</pre></td></tr> |
1398 | * </table></p> |
1399 | * @param locale The locale of the message to return. |
1400 | * @return The text of the {@code moduleNameOptionArgName} message. |
1401 | * |
1402 | * @throws org.jomc.ObjectManagementException if getting the message instance fails. |
1403 | */ |
1404 | @javax.annotation.Generated( value = "org.jomc.tools.JavaSources", |
1405 | comments = "See http://jomc.sourceforge.net/jomc/1.0-alpha-15/jomc-tools" ) |
1406 | private String getModuleNameOptionArgNameMessage( final java.util.Locale locale ) |
1407 | { |
1408 | final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "moduleNameOptionArgName", locale ); |
1409 | assert _m != null : "'moduleNameOptionArgName' message not found."; |
1410 | return _m; |
1411 | } |
1412 | |
1413 | /** |
1414 | * Gets the text of the {@code modulesReport} message. |
1415 | * <p><b>Templates</b><br/><table> |
1416 | * <tr><td valign="top">English:</td><td valign="top"><pre>Modules</pre></td></tr> |
1417 | * <tr><td valign="top">Deutsch:</td><td valign="top"><pre>Module</pre></td></tr> |
1418 | * </table></p> |
1419 | * @param locale The locale of the message to return. |
1420 | * @return The text of the {@code modulesReport} message. |
1421 | * |
1422 | * @throws org.jomc.ObjectManagementException if getting the message instance fails. |
1423 | */ |
1424 | @javax.annotation.Generated( value = "org.jomc.tools.JavaSources", |
1425 | comments = "See http://jomc.sourceforge.net/jomc/1.0-alpha-15/jomc-tools" ) |
1426 | private String getModulesReportMessage( final java.util.Locale locale ) |
1427 | { |
1428 | final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "modulesReport", locale ); |
1429 | assert _m != null : "'modulesReport' message not found."; |
1430 | return _m; |
1431 | } |
1432 | |
1433 | /** |
1434 | * Gets the text of the {@code noClasspathResolutionOption} message. |
1435 | * <p><b>Templates</b><br/><table> |
1436 | * <tr><td valign="top">English:</td><td valign="top"><pre>Do not perform classpath resolution.</pre></td></tr> |
1437 | * <tr><td valign="top">Deutsch:</td><td valign="top"><pre>Keine Klassenpfad-Auflösung durchführen.</pre></td></tr> |
1438 | * </table></p> |
1439 | * @param locale The locale of the message to return. |
1440 | * @return The text of the {@code noClasspathResolutionOption} message. |
1441 | * |
1442 | * @throws org.jomc.ObjectManagementException if getting the message instance fails. |
1443 | */ |
1444 | @javax.annotation.Generated( value = "org.jomc.tools.JavaSources", |
1445 | comments = "See http://jomc.sourceforge.net/jomc/1.0-alpha-15/jomc-tools" ) |
1446 | private String getNoClasspathResolutionOptionMessage( final java.util.Locale locale ) |
1447 | { |
1448 | final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "noClasspathResolutionOption", locale ); |
1449 | assert _m != null : "'noClasspathResolutionOption' message not found."; |
1450 | return _m; |
1451 | } |
1452 | |
1453 | /** |
1454 | * Gets the text of the {@code separator} message. |
1455 | * <p><b>Templates</b><br/><table> |
1456 | * <tr><td valign="top">English:</td><td valign="top"><pre>--------------------------------------------------------------------------------</pre></td></tr> |
1457 | * </table></p> |
1458 | * @param locale The locale of the message to return. |
1459 | * @return The text of the {@code separator} message. |
1460 | * |
1461 | * @throws org.jomc.ObjectManagementException if getting the message instance fails. |
1462 | */ |
1463 | @javax.annotation.Generated( value = "org.jomc.tools.JavaSources", |
1464 | comments = "See http://jomc.sourceforge.net/jomc/1.0-alpha-15/jomc-tools" ) |
1465 | private String getSeparatorMessage( final java.util.Locale locale ) |
1466 | { |
1467 | final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "separator", locale ); |
1468 | assert _m != null : "'separator' message not found."; |
1469 | return _m; |
1470 | } |
1471 | |
1472 | /** |
1473 | * Gets the text of the {@code shortDescription} message. |
1474 | * <p><b>Templates</b><br/><table> |
1475 | * <tr><td valign="top">English:</td><td valign="top"><pre>Does nothing.</pre></td></tr> |
1476 | * <tr><td valign="top">Deutsch:</td><td valign="top"><pre>Führt nichts aus.</pre></td></tr> |
1477 | * </table></p> |
1478 | * @param locale The locale of the message to return. |
1479 | * @return The text of the {@code shortDescription} message. |
1480 | * |
1481 | * @throws org.jomc.ObjectManagementException if getting the message instance fails. |
1482 | */ |
1483 | @javax.annotation.Generated( value = "org.jomc.tools.JavaSources", |
1484 | comments = "See http://jomc.sourceforge.net/jomc/1.0-alpha-15/jomc-tools" ) |
1485 | private String getShortDescriptionMessage( final java.util.Locale locale ) |
1486 | { |
1487 | final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "shortDescription", locale ); |
1488 | assert _m != null : "'shortDescription' message not found."; |
1489 | return _m; |
1490 | } |
1491 | |
1492 | /** |
1493 | * Gets the text of the {@code startingModuleProcessing} message. |
1494 | * <p><b>Templates</b><br/><table> |
1495 | * <tr><td valign="top">English:</td><td valign="top"><pre>Executing command {0} with module ''{1}'' ...</pre></td></tr> |
1496 | * <tr><td valign="top">Deutsch:</td><td valign="top"><pre>Führt Befehl {0} mit Modul ''{1}'' aus ... </pre></td></tr> |
1497 | * </table></p> |
1498 | * @param locale The locale of the message to return. |
1499 | * @param toolName Format argument. |
1500 | * @param moduleName Format argument. |
1501 | * @return The text of the {@code startingModuleProcessing} message. |
1502 | * |
1503 | * @throws org.jomc.ObjectManagementException if getting the message instance fails. |
1504 | */ |
1505 | @javax.annotation.Generated( value = "org.jomc.tools.JavaSources", |
1506 | comments = "See http://jomc.sourceforge.net/jomc/1.0-alpha-15/jomc-tools" ) |
1507 | private String getStartingModuleProcessingMessage( final java.util.Locale locale, final java.lang.String toolName, final java.lang.String moduleName ) |
1508 | { |
1509 | final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "startingModuleProcessing", locale, toolName, moduleName ); |
1510 | assert _m != null : "'startingModuleProcessing' message not found."; |
1511 | return _m; |
1512 | } |
1513 | |
1514 | /** |
1515 | * Gets the text of the {@code startingProcessing} message. |
1516 | * <p><b>Templates</b><br/><table> |
1517 | * <tr><td valign="top">English:</td><td valign="top"><pre>Executing command {0} ...</pre></td></tr> |
1518 | * <tr><td valign="top">Deutsch:</td><td valign="top"><pre>Führt Befehl {0} aus ... </pre></td></tr> |
1519 | * </table></p> |
1520 | * @param locale The locale of the message to return. |
1521 | * @param toolName Format argument. |
1522 | * @return The text of the {@code startingProcessing} message. |
1523 | * |
1524 | * @throws org.jomc.ObjectManagementException if getting the message instance fails. |
1525 | */ |
1526 | @javax.annotation.Generated( value = "org.jomc.tools.JavaSources", |
1527 | comments = "See http://jomc.sourceforge.net/jomc/1.0-alpha-15/jomc-tools" ) |
1528 | private String getStartingProcessingMessage( final java.util.Locale locale, final java.lang.String toolName ) |
1529 | { |
1530 | final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "startingProcessing", locale, toolName ); |
1531 | assert _m != null : "'startingProcessing' message not found."; |
1532 | return _m; |
1533 | } |
1534 | |
1535 | /** |
1536 | * Gets the text of the {@code toolFailure} message. |
1537 | * <p><b>Templates</b><br/><table> |
1538 | * <tr><td valign="top">English:</td><td valign="top"><pre>{0} failure.</pre></td></tr> |
1539 | * <tr><td valign="top">Deutsch:</td><td valign="top"><pre>{0} fehlgeschlagen.</pre></td></tr> |
1540 | * </table></p> |
1541 | * @param locale The locale of the message to return. |
1542 | * @param toolName Format argument. |
1543 | * @return The text of the {@code toolFailure} message. |
1544 | * |
1545 | * @throws org.jomc.ObjectManagementException if getting the message instance fails. |
1546 | */ |
1547 | @javax.annotation.Generated( value = "org.jomc.tools.JavaSources", |
1548 | comments = "See http://jomc.sourceforge.net/jomc/1.0-alpha-15/jomc-tools" ) |
1549 | private String getToolFailureMessage( final java.util.Locale locale, final java.lang.String toolName ) |
1550 | { |
1551 | final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "toolFailure", locale, toolName ); |
1552 | assert _m != null : "'toolFailure' message not found."; |
1553 | return _m; |
1554 | } |
1555 | |
1556 | /** |
1557 | * Gets the text of the {@code toolSuccess} message. |
1558 | * <p><b>Templates</b><br/><table> |
1559 | * <tr><td valign="top">English:</td><td valign="top"><pre>{0} successful.</pre></td></tr> |
1560 | * <tr><td valign="top">Deutsch:</td><td valign="top"><pre>{0} erfolgreich.</pre></td></tr> |
1561 | * </table></p> |
1562 | * @param locale The locale of the message to return. |
1563 | * @param toolName Format argument. |
1564 | * @return The text of the {@code toolSuccess} message. |
1565 | * |
1566 | * @throws org.jomc.ObjectManagementException if getting the message instance fails. |
1567 | */ |
1568 | @javax.annotation.Generated( value = "org.jomc.tools.JavaSources", |
1569 | comments = "See http://jomc.sourceforge.net/jomc/1.0-alpha-15/jomc-tools" ) |
1570 | private String getToolSuccessMessage( final java.util.Locale locale, final java.lang.String toolName ) |
1571 | { |
1572 | final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "toolSuccess", locale, toolName ); |
1573 | assert _m != null : "'toolSuccess' message not found."; |
1574 | return _m; |
1575 | } |
1576 | // </editor-fold> |
1577 | // SECTION-END |
1578 | } |