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