View Javadoc

1   // SECTION-START[License Header]
2   // <editor-fold defaultstate="collapsed" desc=" Generated License ">
3   /*
4    *   Java Object Management and Configuration
5    *   Copyright (C) Christian Schulte, 2005-206
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 "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
21   *   INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
22   *   AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
23   *   THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT,
24   *   INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
25   *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26   *   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27   *   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28   *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
29   *   THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30   *
31   *   $JOMC: AbstractCommand.java 4511 2012-04-24 01:59:23Z schulte2005 $
32   *
33   */
34  // </editor-fold>
35  // SECTION-END
36  package org.jomc.cli.commands;
37  
38  import java.util.LinkedList;
39  import java.util.List;
40  import java.util.Locale;
41  import java.util.logging.Level;
42  import org.apache.commons.cli.CommandLine;
43  
44  // SECTION-START[Documentation]
45  // <editor-fold defaultstate="collapsed" desc=" Generated Documentation ">
46  /**
47   * JOMC CLI command implementation.
48   *
49   * <dl>
50   *   <dt><b>Identifier:</b></dt><dd>JOMC CLI Command</dd>
51   *   <dt><b>Name:</b></dt><dd>JOMC CLI Command</dd>
52   *   <dt><b>Specifications:</b></dt>
53   *     <dd>JOMC CLI Command @ 1.0</dd>
54   *   <dt><b>Abstract:</b></dt><dd>Yes</dd>
55   *   <dt><b>Final:</b></dt><dd>No</dd>
56   *   <dt><b>Stateless:</b></dt><dd>No</dd>
57   * </dl>
58   *
59   * @author <a href="mailto:schulte2005@users.sourceforge.net">Christian Schulte</a> 1.0
60   * @version 1.2.7
61   */
62  // </editor-fold>
63  // SECTION-END
64  // SECTION-START[Annotations]
65  // <editor-fold defaultstate="collapsed" desc=" Generated Annotations ">
66  @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.3", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.3" )
67  // </editor-fold>
68  // SECTION-END
69  public abstract class AbstractCommand
70      implements
71      org.jomc.cli.Command
72  {
73      // SECTION-START[Command]
74  
75      /** The listeners of the instance. */
76      private List<Listener> listeners;
77  
78      /** Log level of the instance. */
79      private Level logLevel;
80  
81      /**
82       * Gets the list of registered listeners.
83       * <p>This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make
84       * to the returned list will be present inside the object. This is why there is no {@code set} method for the
85       * listeners property.</p>
86       *
87       * @return The list of registered listeners.
88       *
89       * @see #log(java.util.logging.Level, java.lang.String, java.lang.Throwable)
90       */
91      public final List<Listener> getListeners()
92      {
93          if ( this.listeners == null )
94          {
95              this.listeners = new LinkedList<Listener>();
96          }
97  
98          return this.listeners;
99      }
100 
101     /**
102      * Gets the log level of the instance.
103      *
104      * @return The log level of the instance.
105      *
106      * @see #getDefaultLogLevel()
107      * @see #setLogLevel(java.util.logging.Level)
108      * @see #isLoggable(java.util.logging.Level)
109      */
110     public final Level getLogLevel()
111     {
112         if ( this.logLevel == null )
113         {
114             this.logLevel = getDefaultLogLevel();
115 
116             if ( this.isLoggable( Level.CONFIG ) )
117             {
118                 this.log( Level.CONFIG,
119                           this.getDefaultLogLevelInfo( this.getLocale(), this.logLevel.getLocalizedName() ), null );
120 
121             }
122         }
123 
124         return this.logLevel;
125     }
126 
127     /**
128      * Sets the log level of the instance.
129      *
130      * @param value The new log level of the instance or {@code null}.
131      *
132      * @see #getLogLevel()
133      * @see #isLoggable(java.util.logging.Level)
134      */
135     public final void setLogLevel( final Level value )
136     {
137         this.logLevel = value;
138     }
139 
140     public final String getName()
141     {
142         return this.getCommandName();
143     }
144 
145     public final String getAbbreviatedName()
146     {
147         return this.getAbbreviatedCommandName();
148     }
149 
150     public final String getShortDescription( final Locale locale )
151     {
152         return this.getShortDescriptionMessage( locale );
153     }
154 
155     public final String getLongDescription( final Locale locale )
156     {
157         return this.getLongDescriptionMessage( locale );
158     }
159 
160     public final int execute( final CommandLine commandLine )
161     {
162         if ( commandLine == null )
163         {
164             throw new NullPointerException( "commandLine" );
165         }
166 
167         int status;
168 
169         try
170         {
171             if ( this.isLoggable( Level.INFO ) )
172             {
173                 this.log( Level.INFO, this.getSeparator( this.getLocale() ), null );
174                 this.log( Level.INFO, this.getApplicationTitle( this.getLocale() ), null );
175                 this.log( Level.INFO, this.getSeparator( this.getLocale() ), null );
176                 this.log( Level.INFO, this.getCommandInfoMessage( this.getLocale(), this.getCommandName() ), null );
177             }
178 
179             this.preExecuteCommand( commandLine );
180             this.executeCommand( commandLine );
181             status = STATUS_SUCCESS;
182         }
183         catch ( final Throwable t )
184         {
185             this.log( Level.SEVERE, null, t );
186             status = STATUS_FAILURE;
187         }
188         finally
189         {
190             try
191             {
192                 this.postExecuteCommand( commandLine );
193             }
194             catch ( final Throwable t )
195             {
196                 this.log( Level.SEVERE, null, t );
197                 status = STATUS_FAILURE;
198             }
199         }
200 
201         if ( this.isLoggable( Level.INFO ) )
202         {
203             if ( status == STATUS_SUCCESS )
204             {
205                 this.log( Level.INFO, this.getCommandSuccessMessage( this.getLocale(), this.getCommandName() ), null );
206             }
207             else if ( status == STATUS_FAILURE )
208             {
209                 this.log( Level.INFO, this.getCommandFailureMessage( this.getLocale(), this.getCommandName() ), null );
210             }
211 
212             this.log( Level.INFO, this.getSeparator( this.getLocale() ), null );
213         }
214 
215         return status;
216     }
217 
218     // SECTION-END
219     // SECTION-START[AbstractCommand]
220     /** Default log level. */
221     private static volatile Level defaultLogLevel;
222 
223     /**
224      * Gets the default log level events are logged at.
225      * <p>The default log level is controlled by system property
226      * {@code org.jomc.cli.commands.AbstractCommand.defaultLogLevel} holding the log level to log events at by
227      * default. If that property is not set, the {@code WARNING} default is returned.</p>
228      *
229      * @return The log level events are logged at by default.
230      *
231      * @see #getLogLevel()
232      * @see Level#parse(java.lang.String)
233      */
234     public static Level getDefaultLogLevel()
235     {
236         if ( defaultLogLevel == null )
237         {
238             defaultLogLevel = Level.parse(
239                 System.getProperty( "org.jomc.cli.command.AbstractJomcCommand.defaultLogLevel",
240                                     System.getProperty( "org.jomc.cli.commands.AbstractCommand.defaultLogLevel",
241                                                         Level.WARNING.getName() ) ) );
242 
243         }
244 
245         return defaultLogLevel;
246     }
247 
248     /**
249      * Sets the default log level events are logged at.
250      *
251      * @param value The new default level events are logged at or {@code null}.
252      *
253      * @see #getDefaultLogLevel()
254      */
255     public static void setDefaultLogLevel( final Level value )
256     {
257         defaultLogLevel = value;
258     }
259 
260     /**
261      * Checks if a message at a given level is provided to the listeners of the instance.
262      *
263      * @param level The level to test.
264      *
265      * @return {@code true}, if messages at {@code level} are provided to the listeners of the instance;
266      * {@code false}, if messages at {@code level} are not provided to the listeners of the instance.
267      *
268      * @throws NullPointerException if {@code level} is {@code null}.
269      *
270      * @see #getLogLevel()
271      * @see #setLogLevel(java.util.logging.Level)
272      */
273     protected boolean isLoggable( final Level level )
274     {
275         if ( level == null )
276         {
277             throw new NullPointerException( "level" );
278         }
279 
280         return level.intValue() >= this.getLogLevel().intValue();
281     }
282 
283     /**
284      * Notifies registered listeners.
285      *
286      * @param level The level of the event.
287      * @param message The message of the event or {@code null}.
288      * @param throwable The throwable of the event {@code null}.
289      *
290      * @throws NullPointerException if {@code level} is {@code null}.
291      *
292      * @see #getListeners()
293      * @see #isLoggable(java.util.logging.Level)
294      */
295     protected void log( final Level level, final String message, final Throwable throwable )
296     {
297         if ( level == null )
298         {
299             throw new NullPointerException( "level" );
300         }
301 
302         if ( this.isLoggable( level ) )
303         {
304             for ( Listener l : this.getListeners() )
305             {
306                 l.onLog( level, message, throwable );
307             }
308         }
309     }
310 
311     /**
312      * Called by the {@code execute} method prior to the {@code executeCommand} method.
313      *
314      * @param commandLine The command line to execute.
315      *
316      * @throws NullPointerException if {@code commandLine} is {@code null}.
317      * @throws CommandExecutionException if executing the command fails.
318      *
319      * @see #execute(org.apache.commons.cli.CommandLine)
320      */
321     protected void preExecuteCommand( final CommandLine commandLine ) throws CommandExecutionException
322     {
323         if ( commandLine == null )
324         {
325             throw new NullPointerException( "commandLine" );
326         }
327     }
328 
329     /**
330      * Called by the {@code execute} method prior to the {@code postExecuteCommand} method.
331      *
332      * @param commandLine The command line to execute.
333      *
334      * @throws CommandExecutionException if executing the command fails.
335      *
336      * @see #execute(org.apache.commons.cli.CommandLine)
337      */
338     protected abstract void executeCommand( final CommandLine commandLine ) throws CommandExecutionException;
339 
340     /**
341      * Called by the {@code execute} method after the {@code preExecuteCommand}/{@code executeCommand} methods even if
342      * those methods threw an exception.
343      *
344      * @param commandLine The command line to execute.
345      *
346      * @throws NullPointerException if {@code commandLine} is {@code null}.
347      * @throws CommandExecutionException if executing the command fails.
348      *
349      * @see #execute(org.apache.commons.cli.CommandLine)
350      */
351     protected void postExecuteCommand( final CommandLine commandLine ) throws CommandExecutionException
352     {
353         if ( commandLine == null )
354         {
355             throw new NullPointerException( "commandLine" );
356         }
357     }
358 
359     /**
360      * Gets a message of a given throwable recursively.
361      *
362      * @param t The {@code Throwable} to get the message of or {@code null}.
363      *
364      * @return The message associated with {@code t} or {@code null}.
365      */
366     protected static String getExceptionMessage( final Throwable t )
367     {
368         return t != null ? t.getMessage() != null ? t.getMessage() : getExceptionMessage( t.getCause() ) : null;
369     }
370 
371     // SECTION-END
372     // SECTION-START[Constructors]
373     // <editor-fold defaultstate="collapsed" desc=" Generated Constructors ">
374     /** Creates a new {@code AbstractCommand} instance. */
375     @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.3", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.3" )
376     public AbstractCommand()
377     {
378         // SECTION-START[Default Constructor]
379         super();
380         // SECTION-END
381     }
382     // </editor-fold>
383     // SECTION-END
384     // SECTION-START[Dependencies]
385     // <editor-fold defaultstate="collapsed" desc=" Generated Dependencies ">
386     /**
387      * Gets the {@code <Locale>} dependency.
388      * <p>
389      *   This method returns the {@code <default>} object of the {@code <java.util.Locale>} specification at specification level 1.1.
390      *   That specification does not apply to any scope. A new object is returned whenever requested and bound to this instance.
391      * </p>
392      * <dl>
393      *   <dt><b>Final:</b></dt><dd>No</dd>
394      * </dl>
395      * @return The {@code <Locale>} dependency.
396      * @throws org.jomc.ObjectManagementException if getting the dependency instance fails.
397      */
398     @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.3", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.3" )
399     private java.util.Locale getLocale()
400     {
401         final java.util.Locale _d = (java.util.Locale) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "Locale" );
402         assert _d != null : "'Locale' dependency not found.";
403         return _d;
404     }
405     // </editor-fold>
406     // SECTION-END
407     // SECTION-START[Properties]
408     // <editor-fold defaultstate="collapsed" desc=" Generated Properties ">
409     /**
410      * Gets the value of the {@code <abbreviatedCommandName>} property.
411      * <p><dl>
412      *   <dt><b>Final:</b></dt><dd>No</dd>
413      * </dl></p>
414      * @return Abbreviated name of the command.
415      * @throws org.jomc.ObjectManagementException if getting the property instance fails.
416      */
417     @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.3", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.3" )
418     private java.lang.String getAbbreviatedCommandName()
419     {
420         final java.lang.String _p = (java.lang.String) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getProperty( this, "abbreviatedCommandName" );
421         assert _p != null : "'abbreviatedCommandName' property not found.";
422         return _p;
423     }
424     /**
425      * Gets the value of the {@code <commandName>} property.
426      * <p><dl>
427      *   <dt><b>Final:</b></dt><dd>No</dd>
428      * </dl></p>
429      * @return Name of the command.
430      * @throws org.jomc.ObjectManagementException if getting the property instance fails.
431      */
432     @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.3", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.3" )
433     private java.lang.String getCommandName()
434     {
435         final java.lang.String _p = (java.lang.String) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getProperty( this, "commandName" );
436         assert _p != null : "'commandName' property not found.";
437         return _p;
438     }
439     // </editor-fold>
440     // SECTION-END
441     // SECTION-START[Messages]
442     // <editor-fold defaultstate="collapsed" desc=" Generated Messages ">
443     /**
444      * Gets the text of the {@code <applicationTitle>} message.
445      * <p><dl>
446      *   <dt><b>Languages:</b></dt>
447      *     <dd>English (default)</dd>
448      *   <dt><b>Final:</b></dt><dd>No</dd>
449      * </dl></p>
450      * @param locale The locale of the message to return.
451      * @return The text of the {@code <applicationTitle>} message for {@code locale}.
452      * @throws org.jomc.ObjectManagementException if getting the message instance fails.
453      */
454     @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.3", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.3" )
455     private String getApplicationTitle( final java.util.Locale locale )
456     {
457         final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "applicationTitle", locale );
458         assert _m != null : "'applicationTitle' message not found.";
459         return _m;
460     }
461     /**
462      * Gets the text of the {@code <commandFailureMessage>} message.
463      * <p><dl>
464      *   <dt><b>Languages:</b></dt>
465      *     <dd>English (default)</dd>
466      *     <dd>Deutsch</dd>
467      *   <dt><b>Final:</b></dt><dd>No</dd>
468      * </dl></p>
469      * @param locale The locale of the message to return.
470      * @param toolName Format argument.
471      * @return The text of the {@code <commandFailureMessage>} message for {@code locale}.
472      * @throws org.jomc.ObjectManagementException if getting the message instance fails.
473      */
474     @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.3", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.3" )
475     private String getCommandFailureMessage( final java.util.Locale locale, final java.lang.String toolName )
476     {
477         final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "commandFailureMessage", locale, toolName );
478         assert _m != null : "'commandFailureMessage' message not found.";
479         return _m;
480     }
481     /**
482      * Gets the text of the {@code <commandInfoMessage>} message.
483      * <p><dl>
484      *   <dt><b>Languages:</b></dt>
485      *     <dd>English (default)</dd>
486      *     <dd>Deutsch</dd>
487      *   <dt><b>Final:</b></dt><dd>No</dd>
488      * </dl></p>
489      * @param locale The locale of the message to return.
490      * @param toolName Format argument.
491      * @return The text of the {@code <commandInfoMessage>} message for {@code locale}.
492      * @throws org.jomc.ObjectManagementException if getting the message instance fails.
493      */
494     @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.3", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.3" )
495     private String getCommandInfoMessage( final java.util.Locale locale, final java.lang.String toolName )
496     {
497         final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "commandInfoMessage", locale, toolName );
498         assert _m != null : "'commandInfoMessage' message not found.";
499         return _m;
500     }
501     /**
502      * Gets the text of the {@code <commandSuccessMessage>} message.
503      * <p><dl>
504      *   <dt><b>Languages:</b></dt>
505      *     <dd>English (default)</dd>
506      *     <dd>Deutsch</dd>
507      *   <dt><b>Final:</b></dt><dd>No</dd>
508      * </dl></p>
509      * @param locale The locale of the message to return.
510      * @param toolName Format argument.
511      * @return The text of the {@code <commandSuccessMessage>} message for {@code locale}.
512      * @throws org.jomc.ObjectManagementException if getting the message instance fails.
513      */
514     @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.3", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.3" )
515     private String getCommandSuccessMessage( final java.util.Locale locale, final java.lang.String toolName )
516     {
517         final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "commandSuccessMessage", locale, toolName );
518         assert _m != null : "'commandSuccessMessage' message not found.";
519         return _m;
520     }
521     /**
522      * Gets the text of the {@code <defaultLogLevelInfo>} message.
523      * <p><dl>
524      *   <dt><b>Languages:</b></dt>
525      *     <dd>English (default)</dd>
526      *     <dd>Deutsch</dd>
527      *   <dt><b>Final:</b></dt><dd>No</dd>
528      * </dl></p>
529      * @param locale The locale of the message to return.
530      * @param defaultLogLevel Format argument.
531      * @return The text of the {@code <defaultLogLevelInfo>} message for {@code locale}.
532      * @throws org.jomc.ObjectManagementException if getting the message instance fails.
533      */
534     @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.3", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.3" )
535     private String getDefaultLogLevelInfo( final java.util.Locale locale, final java.lang.String defaultLogLevel )
536     {
537         final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "defaultLogLevelInfo", locale, defaultLogLevel );
538         assert _m != null : "'defaultLogLevelInfo' message not found.";
539         return _m;
540     }
541     /**
542      * Gets the text of the {@code <longDescriptionMessage>} message.
543      * <p><dl>
544      *   <dt><b>Languages:</b></dt>
545      *     <dd>English (default)</dd>
546      *   <dt><b>Final:</b></dt><dd>No</dd>
547      * </dl></p>
548      * @param locale The locale of the message to return.
549      * @return The text of the {@code <longDescriptionMessage>} message for {@code locale}.
550      * @throws org.jomc.ObjectManagementException if getting the message instance fails.
551      */
552     @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.3", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.3" )
553     private String getLongDescriptionMessage( final java.util.Locale locale )
554     {
555         final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "longDescriptionMessage", locale );
556         assert _m != null : "'longDescriptionMessage' message not found.";
557         return _m;
558     }
559     /**
560      * Gets the text of the {@code <separator>} message.
561      * <p><dl>
562      *   <dt><b>Languages:</b></dt>
563      *     <dd>English (default)</dd>
564      *   <dt><b>Final:</b></dt><dd>No</dd>
565      * </dl></p>
566      * @param locale The locale of the message to return.
567      * @return The text of the {@code <separator>} message for {@code locale}.
568      * @throws org.jomc.ObjectManagementException if getting the message instance fails.
569      */
570     @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.3", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.3" )
571     private String getSeparator( final java.util.Locale locale )
572     {
573         final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "separator", locale );
574         assert _m != null : "'separator' message not found.";
575         return _m;
576     }
577     /**
578      * Gets the text of the {@code <shortDescriptionMessage>} message.
579      * <p><dl>
580      *   <dt><b>Languages:</b></dt>
581      *     <dd>English (default)</dd>
582      *   <dt><b>Final:</b></dt><dd>No</dd>
583      * </dl></p>
584      * @param locale The locale of the message to return.
585      * @return The text of the {@code <shortDescriptionMessage>} message for {@code locale}.
586      * @throws org.jomc.ObjectManagementException if getting the message instance fails.
587      */
588     @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.3", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.3" )
589     private String getShortDescriptionMessage( final java.util.Locale locale )
590     {
591         final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "shortDescriptionMessage", locale );
592         assert _m != null : "'shortDescriptionMessage' message not found.";
593         return _m;
594     }
595     // </editor-fold>
596     // SECTION-END
597     // SECTION-START[Generated Command]
598     // <editor-fold defaultstate="collapsed" desc=" Generated Options ">
599     /**
600      * Gets the options of the command.
601      * <p><strong>Options:</strong>
602      *   <table border="1" width="100%" cellpadding="3" cellspacing="0">
603      *     <tr class="TableSubHeadingColor">
604      *       <th align="left" scope="col" nowrap><b>Specification</b></th>
605      *       <th align="left" scope="col" nowrap><b>Implementation</b></th>
606      *     </tr>
607      *   </table>
608      * </p>
609      * @return The options of the command.
610      */
611     @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.3", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.3" )
612     public org.apache.commons.cli.Options getOptions()
613     {
614         final org.apache.commons.cli.Options options = new org.apache.commons.cli.Options();
615         return options;
616     }
617     // </editor-fold>
618     // SECTION-END
619 }