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 <cs@schulte.it>, 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: AbstractModletCommand.java 5061 2015-05-31 13:20:40Z schulte $
32   *
33   */
34  // </editor-fold>
35  // SECTION-END
36  package org.jomc.cli.commands;
37  
38  import java.io.BufferedReader;
39  import java.io.Closeable;
40  import java.io.File;
41  import java.io.FileOutputStream;
42  import java.io.FileReader;
43  import java.io.IOException;
44  import java.io.InputStream;
45  import java.io.OutputStream;
46  import java.io.StringWriter;
47  import java.net.URI;
48  import java.net.URL;
49  import java.net.URLClassLoader;
50  import java.util.ArrayList;
51  import java.util.Arrays;
52  import java.util.Enumeration;
53  import java.util.HashSet;
54  import java.util.Iterator;
55  import java.util.List;
56  import java.util.Map;
57  import java.util.Set;
58  import java.util.logging.Level;
59  import javax.xml.bind.JAXBElement;
60  import javax.xml.bind.JAXBException;
61  import javax.xml.bind.Marshaller;
62  import javax.xml.bind.PropertyException;
63  import javax.xml.transform.ErrorListener;
64  import javax.xml.transform.Source;
65  import javax.xml.transform.Transformer;
66  import javax.xml.transform.TransformerConfigurationException;
67  import javax.xml.transform.TransformerException;
68  import javax.xml.transform.TransformerFactory;
69  import org.apache.commons.cli.CommandLine;
70  import org.apache.commons.io.IOUtils;
71  import org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement;
72  import org.jomc.model.ModelObject;
73  import org.jomc.modlet.DefaultModelContext;
74  import org.jomc.modlet.DefaultModletProvider;
75  import org.jomc.modlet.ModelContext;
76  import org.jomc.modlet.ModelContextFactory;
77  import org.jomc.modlet.ModelException;
78  import org.jomc.modlet.ModelValidationReport;
79  import org.jomc.modlet.Modlet;
80  import org.jomc.modlet.ModletObject;
81  import org.jomc.modlet.ModletProvider;
82  import org.jomc.modlet.Modlets;
83  import org.jomc.modlet.ObjectFactory;
84  import org.jomc.modlet.Schema;
85  import org.jomc.modlet.Schemas;
86  import org.jomc.modlet.Service;
87  import org.jomc.modlet.Services;
88  
89  // SECTION-START[Documentation]
90  // <editor-fold defaultstate="collapsed" desc=" Generated Documentation ">
91  /**
92   * JOMC ⁑ CLI ⁑ modlet based command implementation.
93   *
94   * <dl>
95   *   <dt><b>Identifier:</b></dt><dd>JOMC ⁑ CLI ⁑ Modlet Command</dd>
96   *   <dt><b>Name:</b></dt><dd>JOMC ⁑ CLI ⁑ Modlet Command</dd>
97   *   <dt><b>Specifications:</b></dt>
98   *     <dd>JOMC ⁑ CLI ⁑ Command @ 1.0</dd>
99   *   <dt><b>Abstract:</b></dt><dd>Yes</dd>
100  *   <dt><b>Final:</b></dt><dd>No</dd>
101  *   <dt><b>Stateless:</b></dt><dd>No</dd>
102  * </dl>
103  *
104  * @author <a href="mailto:cs@schulte.it">Christian Schulte</a> 1.0
105  * @version 1.9
106  */
107 // </editor-fold>
108 // SECTION-END
109 // SECTION-START[Annotations]
110 // <editor-fold defaultstate="collapsed" desc=" Generated Annotations ">
111 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.9", comments = "See http://www.jomc.org/jomc/1.9/jomc-tools-1.9" )
112 // </editor-fold>
113 // SECTION-END
114 public abstract class AbstractModletCommand extends AbstractCommand
115 {
116     // SECTION-START[Command]
117     // SECTION-END
118     // SECTION-START[AbstractModletCommand]
119 
120     /**
121      * Creates a new {@code Transformer} from a given {@code Source}.
122      *
123      * @param source The source to initialize the transformer with.
124      *
125      * @return A {@code Transformer} backed by {@code source}.
126      *
127      * @throws NullPointerException if {@code source} is {@code null}.
128      * @throws CommandExecutionException if creating a transformer fails.
129      */
130     protected Transformer createTransformer( final Source source ) throws CommandExecutionException
131     {
132         if ( source == null )
133         {
134             throw new NullPointerException( "source" );
135         }
136 
137         final ErrorListener errorListener = new ErrorListener()
138         {
139 
140             public void warning( final TransformerException exception ) throws TransformerException
141             {
142                 log( Level.WARNING, null, exception );
143             }
144 
145             public void error( final TransformerException exception ) throws TransformerException
146             {
147                 throw exception;
148             }
149 
150             public void fatalError( final TransformerException exception ) throws TransformerException
151             {
152                 throw exception;
153             }
154 
155         };
156 
157         try
158         {
159             final TransformerFactory transformerFactory = TransformerFactory.newInstance();
160             transformerFactory.setErrorListener( errorListener );
161             final Transformer transformer = transformerFactory.newTransformer( source );
162             transformer.setErrorListener( errorListener );
163 
164             for ( final Map.Entry<Object, Object> e : System.getProperties().entrySet() )
165             {
166                 transformer.setParameter( e.getKey().toString(), e.getValue() );
167             }
168 
169             return transformer;
170         }
171         catch ( final TransformerConfigurationException e )
172         {
173             throw new CommandExecutionException( getExceptionMessage( e ), e );
174         }
175     }
176 
177     /**
178      * Creates a new {@code ModelContext} for a given {@code CommandLine} and {@code ClassLoader}.
179      *
180      * @param commandLine The {@code CommandLine} to create a new {@code ModelContext} with.
181      * @param classLoader The {@code ClassLoader} to create a new {@code ModelContext} with.
182      *
183      * @return A new {@code ModelContext} for {@code classLoader} setup using {@code commandLine}.
184      *
185      * @throws NullPointerException if {@code commandLine} is {@code null}.
186      * @throws CommandExecutionException if creating an new {@code ModelContext} fails.
187      */
188     protected ModelContext createModelContext( final CommandLine commandLine, final ClassLoader classLoader )
189         throws CommandExecutionException
190     {
191         if ( commandLine == null )
192         {
193             throw new NullPointerException( "commandLine" );
194         }
195 
196         final ModelContextFactory modelContextFactory;
197         if ( commandLine.hasOption( this.getModelContextFactoryOption().getOpt() ) )
198         {
199             modelContextFactory = ModelContextFactory.newInstance( commandLine.getOptionValue(
200                 this.getModelContextFactoryOption().getOpt() ) );
201 
202         }
203         else
204         {
205             modelContextFactory = ModelContextFactory.newInstance();
206         }
207 
208         final ModelContext modelContext = modelContextFactory.newModelContext( classLoader );
209 
210         if ( commandLine.hasOption( this.getModletSchemaSystemIdOption().getOpt() ) )
211         {
212             modelContext.setModletSchemaSystemId(
213                 commandLine.getOptionValue( this.getModletSchemaSystemIdOption().getOpt() ) );
214 
215         }
216 
217         modelContext.setLogLevel( this.getLogLevel() );
218         modelContext.getListeners().add( new ModelContext.Listener()
219         {
220 
221             @Override
222             public void onLog( final Level level, final String message, final Throwable t )
223             {
224                 super.onLog( level, message, t );
225                 log( level, message, t );
226             }
227 
228         } );
229 
230         if ( commandLine.hasOption( this.getProviderLocationOption().getOpt() ) )
231         {
232             modelContext.setAttribute( DefaultModelContext.PROVIDER_LOCATION_ATTRIBUTE_NAME,
233                                        commandLine.getOptionValue( this.getProviderLocationOption().getOpt() ) );
234 
235         }
236 
237         if ( commandLine.hasOption( this.getPlatformProviderLocationOption().getOpt() ) )
238         {
239             modelContext.setAttribute(
240                 DefaultModelContext.PLATFORM_PROVIDER_LOCATION_ATTRIBUTE_NAME,
241                 commandLine.getOptionValue( this.getPlatformProviderLocationOption().getOpt() ) );
242 
243         }
244 
245         if ( commandLine.hasOption( this.getModletLocationOption().getOpt() ) )
246         {
247             modelContext.setAttribute( DefaultModletProvider.MODLET_LOCATION_ATTRIBUTE_NAME,
248                                        commandLine.getOptionValue( this.getModletLocationOption().getOpt() ) );
249 
250         }
251 
252         modelContext.setAttribute( DefaultModletProvider.VALIDATING_ATTRIBUTE_NAME,
253                                    !commandLine.hasOption( this.getNoModletResourceValidation().getOpt() ) );
254 
255         return modelContext;
256     }
257 
258     /**
259      * Gets the identifier of the model to process.
260      *
261      * @param commandLine The command line to get the identifier of the model to process from.
262      *
263      * @return The identifier of the model to process.
264      *
265      * @throws NullPointerException if {@code commandLine} is {@code null}.
266      */
267     protected String getModel( final CommandLine commandLine )
268     {
269         if ( commandLine == null )
270         {
271             throw new NullPointerException( "commandLine" );
272         }
273 
274         return commandLine.hasOption( this.getModelOption().getOpt() )
275                    ? commandLine.getOptionValue( this.getModelOption().getOpt() )
276                    : ModelObject.MODEL_PUBLIC_ID;
277 
278     }
279 
280     /**
281      * Logs a validation report.
282      *
283      * @param validationReport The report to log.
284      * @param marshaller The marshaller to use for logging the report.
285      *
286      * @throws CommandExecutionException if logging a report detail element fails.
287      */
288     protected void log( final ModelValidationReport validationReport, final Marshaller marshaller )
289         throws CommandExecutionException
290     {
291         Object jaxbFormattedOutput = null;
292         try
293         {
294             jaxbFormattedOutput = marshaller.getProperty( Marshaller.JAXB_FORMATTED_OUTPUT );
295             marshaller.setProperty( Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE );
296         }
297         catch ( final PropertyException e )
298         {
299             this.log( Level.INFO, null, e );
300             jaxbFormattedOutput = null;
301         }
302 
303         try
304         {
305             for ( final ModelValidationReport.Detail d : validationReport.getDetails() )
306             {
307                 if ( this.isLoggable( d.getLevel() ) )
308                 {
309                     this.log( d.getLevel(), "o " + d.getMessage(), null );
310 
311                     if ( d.getElement() != null && this.getLogLevel().intValue() < Level.INFO.intValue() )
312                     {
313                         final StringWriter stringWriter = new StringWriter();
314                         marshaller.marshal( d.getElement(), stringWriter );
315                         this.log( d.getLevel(), stringWriter.toString(), null );
316                     }
317                 }
318             }
319         }
320         catch ( final JAXBException e )
321         {
322             String message = getExceptionMessage( e );
323             if ( message == null )
324             {
325                 message = getExceptionMessage( e.getLinkedException() );
326             }
327 
328             throw new CommandExecutionException( message, e );
329         }
330         finally
331         {
332             try
333             {
334                 marshaller.setProperty( Marshaller.JAXB_FORMATTED_OUTPUT, jaxbFormattedOutput );
335             }
336             catch ( final PropertyException e )
337             {
338                 this.log( Level.INFO, null, e );
339             }
340         }
341     }
342 
343     /**
344      * Gets the document files specified by a given command line.
345      *
346      * @param commandLine The command line specifying the document files to get.
347      *
348      * @return The document files specified by {@code commandLine}.
349      *
350      * @throws CommandExecutionException if getting the document files fails.
351      */
352     protected Set<File> getDocumentFiles( final CommandLine commandLine ) throws CommandExecutionException
353     {
354         try
355         {
356             final Set<File> files = new HashSet<File>();
357 
358             if ( commandLine.hasOption( this.getDocumentsOption().getOpt() ) )
359             {
360                 final String[] elements = commandLine.getOptionValues( this.getDocumentsOption().getOpt() );
361                 if ( elements != null )
362                 {
363                     for ( final String e : elements )
364                     {
365                         if ( e.startsWith( "@" ) )
366                         {
367                             String line = null;
368                             final File file = new File( e.substring( 1 ) );
369                             BufferedReader reader = null;
370                             boolean suppressExceptionOnClose = true;
371 
372                             try
373                             {
374                                 reader = new BufferedReader( new FileReader( file ) );
375                                 while ( ( line = reader.readLine() ) != null )
376                                 {
377                                     line = line.trim();
378                                     if ( !line.startsWith( "#" ) )
379                                     {
380                                         final File f = new File( line );
381 
382                                         if ( f.exists() )
383                                         {
384                                             if ( this.isLoggable( Level.FINER ) )
385                                             {
386                                                 this.log( Level.FINER, this.getDocumentFileInfo(
387                                                           this.getLocale(), f.getAbsolutePath() ), null );
388 
389                                             }
390 
391                                             files.add( f );
392                                         }
393                                         else if ( this.isLoggable( Level.WARNING ) )
394                                         {
395                                             this.log( Level.WARNING, this.getDocumentFileNotFoundWarning(
396                                                       this.getLocale(), f.getAbsolutePath() ), null );
397 
398                                         }
399                                     }
400                                 }
401 
402                                 suppressExceptionOnClose = false;
403                             }
404                             finally
405                             {
406                                 try
407                                 {
408                                     if ( reader != null )
409                                     {
410                                         reader.close();
411                                     }
412                                 }
413                                 catch ( final IOException ex )
414                                 {
415                                     if ( suppressExceptionOnClose )
416                                     {
417                                         this.log( Level.SEVERE, getExceptionMessage( ex ), ex );
418                                     }
419                                     else
420                                     {
421                                         throw new CommandExecutionException( getExceptionMessage( ex ), ex );
422                                     }
423                                 }
424                             }
425                         }
426                         else
427                         {
428                             final File file = new File( e );
429 
430                             if ( file.exists() )
431                             {
432                                 if ( this.isLoggable( Level.FINER ) )
433                                 {
434                                     this.log( Level.FINER, this.getDocumentFileInfo(
435                                               this.getLocale(), file.getAbsolutePath() ), null );
436 
437                                 }
438 
439                                 files.add( file );
440                             }
441                             else if ( this.isLoggable( Level.WARNING ) )
442                             {
443                                 this.log( Level.WARNING, this.getDocumentFileNotFoundWarning(
444                                           this.getLocale(), file.getAbsolutePath() ), null );
445 
446                             }
447                         }
448                     }
449                 }
450             }
451 
452             return files;
453         }
454         catch ( final IOException e )
455         {
456             throw new CommandExecutionException( getExceptionMessage( e ), e );
457         }
458     }
459 
460     /**
461      * Class loader backed by a command line.
462      *
463      * @author <a href="mailto:cs@schulte.it">Christian Schulte</a>
464      * @version $JOMC: AbstractModletCommand.java 5061 2015-05-31 13:20:40Z schulte $
465      */
466     public class CommandLineClassLoader extends URLClassLoader
467     {
468 
469         /**
470          * {@code Modlets} excluded by the instance.
471          */
472         private Modlets excludedModlets;
473 
474         /**
475          * Set of provider resource locations to filter.
476          */
477         private final Set<String> providerResourceLocations = new HashSet<String>();
478 
479         /**
480          * Set of modlet resource locations to filter.
481          */
482         private final Set<String> modletResourceLocations = new HashSet<String>();
483 
484         /**
485          * Set of temporary resources.
486          */
487         private final Set<File> temporaryResources = new HashSet<File>();
488 
489         /**
490          * Creates a new {@code CommandLineClassLoader} taking a command line backing the class loader.
491          *
492          * @param commandLine The command line backing the class loader.
493          *
494          * @throws NullPointerException if {@code commandLine} is {@code null}.
495          * @throws CommandExecutionException if processing {@code commandLine} fails.
496          */
497         public CommandLineClassLoader( final CommandLine commandLine ) throws CommandExecutionException
498         {
499             super( new URL[ 0 ] );
500 
501             try
502             {
503                 if ( commandLine.hasOption( getClasspathOption().getOpt() ) )
504                 {
505                     final Set<URI> uris = new HashSet<URI>();
506                     final String[] elements = commandLine.getOptionValues( getClasspathOption().getOpt() );
507 
508                     if ( elements != null )
509                     {
510                         for ( final String e : elements )
511                         {
512                             if ( e.startsWith( "@" ) )
513                             {
514                                 String line = null;
515                                 final File file = new File( e.substring( 1 ) );
516                                 BufferedReader reader = null;
517                                 boolean suppressExceptionOnClose = true;
518 
519                                 try
520                                 {
521                                     reader = new BufferedReader( new FileReader( file ) );
522                                     while ( ( line = reader.readLine() ) != null )
523                                     {
524                                         line = line.trim();
525                                         if ( !line.startsWith( "#" ) )
526                                         {
527                                             final File f = new File( line );
528 
529                                             if ( f.exists() )
530                                             {
531                                                 uris.add( f.toURI() );
532                                             }
533                                             else if ( isLoggable( Level.WARNING ) )
534                                             {
535                                                 log( Level.WARNING, getClasspathElementNotFoundWarning(
536                                                      getLocale(), f.getAbsolutePath() ), null );
537 
538                                             }
539                                         }
540                                     }
541 
542                                     suppressExceptionOnClose = false;
543                                 }
544                                 finally
545                                 {
546                                     try
547                                     {
548                                         if ( reader != null )
549                                         {
550                                             reader.close();
551                                         }
552                                     }
553                                     catch ( final IOException ex )
554                                     {
555                                         if ( suppressExceptionOnClose )
556                                         {
557                                             log( Level.SEVERE, getExceptionMessage( ex ), ex );
558                                         }
559                                         else
560                                         {
561                                             throw new CommandExecutionException( getExceptionMessage( ex ), ex );
562                                         }
563                                     }
564                                 }
565                             }
566                             else
567                             {
568                                 final File file = new File( e );
569 
570                                 if ( file.exists() )
571                                 {
572                                     uris.add( file.toURI() );
573                                 }
574                                 else if ( isLoggable( Level.WARNING ) )
575                                 {
576                                     log( Level.WARNING, getClasspathElementNotFoundWarning(
577                                          getLocale(), file.getAbsolutePath() ), null );
578 
579                                 }
580                             }
581                         }
582                     }
583 
584                     for ( final URI uri : uris )
585                     {
586                         if ( isLoggable( Level.FINEST ) )
587                         {
588                             log( Level.FINEST, getClasspathElementInfo( getLocale(), uri.toASCIIString() ), null );
589                         }
590 
591                         this.addURL( uri.toURL() );
592                     }
593 
594                     if ( commandLine.hasOption( getProviderLocationOption().getOpt() ) )
595                     {
596                         this.providerResourceLocations.add(
597                             commandLine.getOptionValue( getProviderLocationOption().getOpt() )
598                                 + "/" + ModletProvider.class.getName() );
599 
600                     }
601                     else
602                     {
603                         this.providerResourceLocations.add(
604                             DefaultModelContext.getDefaultProviderLocation() + "/" + ModletProvider.class.getName() );
605 
606                     }
607 
608                     if ( commandLine.hasOption( getModletLocationOption().getOpt() ) )
609                     {
610                         this.modletResourceLocations.add(
611                             commandLine.getOptionValue( getModletLocationOption().getOpt() ) );
612 
613                     }
614                     else
615                     {
616                         this.modletResourceLocations.add( DefaultModletProvider.getDefaultModletLocation() );
617                     }
618                 }
619             }
620             catch ( final IOException e )
621             {
622                 throw new CommandExecutionException( getExceptionMessage( e ), e );
623             }
624         }
625 
626         /**
627          * Gets the {@code Modlets} excluded by the instance.
628          *
629          * @return The {@code Modlets} excluded by the instance.
630          */
631         public Modlets getExcludedModlets()
632         {
633             if ( this.excludedModlets == null )
634             {
635                 this.excludedModlets = new Modlets();
636             }
637 
638             return this.excludedModlets;
639         }
640 
641         /**
642          * Finds the resource with the specified name on the URL search path.
643          *
644          * @param name The name of the resource.
645          *
646          * @return A {@code URL} for the resource or {@code null}, if the resource could not be found.
647          */
648         @Override
649         public URL findResource( final String name )
650         {
651             try
652             {
653                 URL resource = super.findResource( name );
654 
655                 if ( resource != null )
656                 {
657                     if ( this.providerResourceLocations.contains( name ) )
658                     {
659                         resource = this.filterProviders( resource );
660                     }
661                     else if ( this.modletResourceLocations.contains( name ) )
662                     {
663                         resource = this.filterModlets( resource );
664                     }
665                 }
666 
667                 return resource;
668             }
669             catch ( final IOException e )
670             {
671                 log( Level.SEVERE, null, e );
672                 return null;
673             }
674             catch ( final JAXBException e )
675             {
676                 log( Level.SEVERE, null, e );
677                 return null;
678             }
679             catch ( final ModelException e )
680             {
681                 log( Level.SEVERE, null, e );
682                 return null;
683             }
684         }
685 
686         /**
687          * Returns an {@code Enumeration} of {@code URL}s representing all of the resources on the URL search path
688          * having the specified name.
689          *
690          * @param name The resource name.
691          *
692          * @throws IOException if an I/O exception occurs
693          *
694          * @return An {@code Enumeration} of {@code URL}s.
695          */
696         @Override
697         public Enumeration<URL> findResources( final String name ) throws IOException
698         {
699             final Enumeration<URL> allResources = super.findResources( name );
700 
701             Enumeration<URL> enumeration = allResources;
702 
703             if ( this.providerResourceLocations.contains( name ) )
704             {
705                 enumeration = new Enumeration<URL>()
706                 {
707 
708                     public boolean hasMoreElements()
709                     {
710                         return allResources.hasMoreElements();
711                     }
712 
713                     public URL nextElement()
714                     {
715                         try
716                         {
717                             return filterProviders( allResources.nextElement() );
718                         }
719                         catch ( final IOException e )
720                         {
721                             log( Level.SEVERE, null, e );
722                             return null;
723                         }
724                     }
725 
726                 };
727             }
728             else if ( this.modletResourceLocations.contains( name ) )
729             {
730                 enumeration = new Enumeration<URL>()
731                 {
732 
733                     public boolean hasMoreElements()
734                     {
735                         return allResources.hasMoreElements();
736                     }
737 
738                     public URL nextElement()
739                     {
740                         try
741                         {
742                             return filterModlets( allResources.nextElement() );
743                         }
744                         catch ( final IOException e )
745                         {
746                             log( Level.SEVERE, null, e );
747                             return null;
748                         }
749                         catch ( final JAXBException e )
750                         {
751                             log( Level.SEVERE, null, e );
752                             return null;
753                         }
754                         catch ( final ModelException e )
755                         {
756                             log( Level.SEVERE, null, e );
757                             return null;
758                         }
759                     }
760 
761                 };
762             }
763 
764             return enumeration;
765         }
766 
767         /**
768          * Closes the class loader.
769          *
770          * @throws IOException if closing the class loader fails.
771          */
772         @Override
773         @IgnoreJRERequirement
774         public void close() throws IOException
775         {
776             for ( final Iterator<File> it = this.temporaryResources.iterator(); it.hasNext(); )
777             {
778                 final File temporaryResource = it.next();
779 
780                 if ( temporaryResource.exists() && temporaryResource.delete() )
781                 {
782                     it.remove();
783                 }
784             }
785 
786             if ( Closeable.class.isAssignableFrom( CommandLineClassLoader.class ) )
787             {
788                 super.close();
789             }
790         }
791 
792         /**
793          * Removes temporary resources.
794          *
795          * @throws Throwable if finalization fails.
796          */
797         @Override
798         protected void finalize() throws Throwable
799         {
800             for ( final Iterator<File> it = this.temporaryResources.iterator(); it.hasNext(); )
801             {
802                 final File temporaryResource = it.next();
803 
804                 if ( temporaryResource.exists() && !temporaryResource.delete() )
805                 {
806                     temporaryResource.deleteOnExit();
807                 }
808 
809                 it.remove();
810             }
811 
812             super.finalize();
813         }
814 
815         private URL filterProviders( final URL resource ) throws IOException
816         {
817             InputStream in = null;
818             boolean suppressExceptionOnClose = true;
819 
820             try
821             {
822                 in = resource.openStream();
823                 URL filteredResource = resource;
824                 final List<String> lines = IOUtils.readLines( in, "UTF-8" );
825                 final List<String> providerExcludes = Arrays.asList( getProviderExcludes().split( ":" ) );
826                 final List<String> filteredLines = new ArrayList<String>( lines.size() );
827 
828                 for ( final String line : lines )
829                 {
830                     if ( !providerExcludes.contains( line.trim() ) )
831                     {
832                         filteredLines.add( line.trim() );
833                     }
834                     else
835                     {
836                         log( Level.FINE,
837                              getExcludedProviderInfo( getLocale(), resource.toExternalForm(), line.toString() ), null );
838 
839                     }
840                 }
841 
842                 if ( lines.size() != filteredLines.size() )
843                 {
844                     OutputStream out = null;
845                     final File tmpResource = File.createTempFile( this.getClass().getName(), ".rsrc" );
846                     this.temporaryResources.add( tmpResource );
847 
848                     try
849                     {
850                         out = new FileOutputStream( tmpResource );
851                         IOUtils.writeLines( filteredLines, System.getProperty( "line.separator", "\n" ), out, "UTF-8" );
852                         suppressExceptionOnClose = false;
853                     }
854                     finally
855                     {
856                         try
857                         {
858                             if ( out != null )
859                             {
860                                 out.close();
861                             }
862 
863                             suppressExceptionOnClose = true;
864                         }
865                         catch ( final IOException e )
866                         {
867                             if ( suppressExceptionOnClose )
868                             {
869                                 log( Level.SEVERE, getExceptionMessage( e ), e );
870                             }
871                             else
872                             {
873                                 throw e;
874                             }
875                         }
876                     }
877 
878                     filteredResource = tmpResource.toURI().toURL();
879                 }
880 
881                 suppressExceptionOnClose = false;
882                 return filteredResource;
883             }
884             finally
885             {
886                 try
887                 {
888                     if ( in != null )
889                     {
890                         in.close();
891                     }
892                 }
893                 catch ( final IOException e )
894                 {
895                     if ( suppressExceptionOnClose )
896                     {
897                         log( Level.SEVERE, getExceptionMessage( e ), e );
898                     }
899                     else
900                     {
901                         throw e;
902                     }
903                 }
904             }
905         }
906 
907         private URL filterModlets( final URL resource ) throws ModelException, IOException, JAXBException
908         {
909             URL filteredResource = resource;
910             final List<String> excludedModletNames = Arrays.asList( getModletExcludes().split( ":" ) );
911             final ModelContext modelContext = ModelContextFactory.newInstance().newModelContext();
912             Object o = modelContext.createUnmarshaller( ModletObject.MODEL_PUBLIC_ID ).unmarshal( resource );
913             if ( o instanceof JAXBElement<?> )
914             {
915                 o = ( (JAXBElement<?>) o ).getValue();
916             }
917 
918             Modlets modlets = null;
919             boolean filtered = false;
920 
921             if ( o instanceof Modlets )
922             {
923                 modlets = (Modlets) o;
924             }
925             else if ( o instanceof Modlet )
926             {
927                 modlets = new Modlets();
928                 modlets.getModlet().add( (Modlet) o );
929             }
930 
931             if ( modlets != null )
932             {
933                 for ( final Iterator<Modlet> it = modlets.getModlet().iterator(); it.hasNext(); )
934                 {
935                     final Modlet m = it.next();
936 
937                     if ( excludedModletNames.contains( m.getName() ) )
938                     {
939                         it.remove();
940                         filtered = true;
941                         this.getExcludedModlets().getModlet().add( m );
942                         log( Level.FINE,
943                              getExcludedModletInfo( getLocale(), resource.toExternalForm(), m.getName() ), null );
944 
945                         continue;
946                     }
947 
948                     if ( this.filterModlet( m, resource.toExternalForm() ) )
949                     {
950                         filtered = true;
951                     }
952                 }
953 
954                 if ( filtered )
955                 {
956                     final File tmpResource = File.createTempFile( this.getClass().getName(), ".rsrc" );
957                     this.temporaryResources.add( tmpResource );
958                     modelContext.createMarshaller( ModletObject.MODEL_PUBLIC_ID ).marshal(
959                         new ObjectFactory().createModlets( modlets ), tmpResource );
960 
961                     filteredResource = tmpResource.toURI().toURL();
962                 }
963             }
964 
965             return filteredResource;
966         }
967 
968         private boolean filterModlet( final Modlet modlet, final String resourceInfo )
969         {
970             boolean filteredSchemas = false;
971             boolean filteredServices = false;
972             final List<String> excludedSchemas = Arrays.asList( getSchemaExcludes().split( ":" ) );
973             final List<String> excludedServices = Arrays.asList( getServiceExcludes().split( ":" ) );
974 
975             if ( modlet.getSchemas() != null )
976             {
977                 final Schemas schemas = new Schemas();
978 
979                 for ( final Schema s : modlet.getSchemas().getSchema() )
980                 {
981                     if ( !excludedSchemas.contains( s.getContextId() ) )
982                     {
983                         schemas.getSchema().add( s );
984                     }
985                     else
986                     {
987                         log( Level.FINE, getExcludedSchemaInfo( getLocale(), resourceInfo, s.getContextId() ), null );
988                         filteredSchemas = true;
989                     }
990                 }
991 
992                 if ( filteredSchemas )
993                 {
994                     modlet.setSchemas( schemas );
995                 }
996             }
997 
998             if ( modlet.getServices() != null )
999             {
1000                 final Services services = new Services();
1001 
1002                 for ( final Service s : modlet.getServices().getService() )
1003                 {
1004                     if ( !excludedServices.contains( s.getClazz() ) )
1005                     {
1006                         services.getService().add( s );
1007                     }
1008                     else
1009                     {
1010                         log( Level.FINE, getExcludedServiceInfo( getLocale(), resourceInfo, s.getClazz() ), null );
1011                         filteredServices = true;
1012                     }
1013                 }
1014 
1015                 if ( filteredServices )
1016                 {
1017                     modlet.setServices( services );
1018                 }
1019             }
1020 
1021             return filteredSchemas || filteredServices;
1022         }
1023 
1024     }
1025 
1026     // SECTION-END
1027     // SECTION-START[Constructors]
1028     // <editor-fold defaultstate="collapsed" desc=" Generated Constructors ">
1029     /** Creates a new {@code AbstractModletCommand} instance. */
1030     @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.9", comments = "See http://www.jomc.org/jomc/1.9/jomc-tools-1.9" )
1031     public AbstractModletCommand()
1032     {
1033         // SECTION-START[Default Constructor]
1034         super();
1035         // SECTION-END
1036     }
1037     // </editor-fold>
1038     // SECTION-END
1039     // SECTION-START[Dependencies]
1040     // <editor-fold defaultstate="collapsed" desc=" Generated Dependencies ">
1041     /**
1042      * Gets the {@code <Classpath Option>} dependency.
1043      * <p>
1044      *   This method returns the {@code <JOMC ⁑ CLI ⁑ Classpath Option>} object of the {@code <JOMC ⁑ CLI ⁑ Command Option>} specification at specification level 1.2.
1045      *   That specification does not apply to any scope. A new object is returned whenever requested and bound to this instance.
1046      * </p>
1047      * <dl>
1048      *   <dt><b>Final:</b></dt><dd>No</dd>
1049      * </dl>
1050      * @return The {@code <Classpath Option>} dependency.
1051      * @throws org.jomc.ObjectManagementException if getting the dependency instance fails.
1052      */
1053     @SuppressWarnings({"unchecked", "unused", "PMD.UnnecessaryFullyQualifiedName"})
1054     @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.9", comments = "See http://www.jomc.org/jomc/1.9/jomc-tools-1.9" )
1055     private org.apache.commons.cli.Option getClasspathOption()
1056     {
1057         final org.apache.commons.cli.Option _d = (org.apache.commons.cli.Option) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "Classpath Option" );
1058         assert _d != null : "'Classpath Option' dependency not found.";
1059         return _d;
1060     }
1061     /**
1062      * Gets the {@code <Documents Option>} dependency.
1063      * <p>
1064      *   This method returns the {@code <JOMC ⁑ CLI ⁑ Documents Option>} object of the {@code <JOMC ⁑ CLI ⁑ Command Option>} specification at specification level 1.2.
1065      *   That specification does not apply to any scope. A new object is returned whenever requested and bound to this instance.
1066      * </p>
1067      * <dl>
1068      *   <dt><b>Final:</b></dt><dd>No</dd>
1069      * </dl>
1070      * @return The {@code <Documents Option>} dependency.
1071      * @throws org.jomc.ObjectManagementException if getting the dependency instance fails.
1072      */
1073     @SuppressWarnings({"unchecked", "unused", "PMD.UnnecessaryFullyQualifiedName"})
1074     @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.9", comments = "See http://www.jomc.org/jomc/1.9/jomc-tools-1.9" )
1075     private org.apache.commons.cli.Option getDocumentsOption()
1076     {
1077         final org.apache.commons.cli.Option _d = (org.apache.commons.cli.Option) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "Documents Option" );
1078         assert _d != null : "'Documents Option' dependency not found.";
1079         return _d;
1080     }
1081     /**
1082      * Gets the {@code <Locale>} dependency.
1083      * <p>
1084      *   This method returns the {@code <default>} object of the {@code <java.util.Locale>} specification at specification level 1.1.
1085      *   That specification does not apply to any scope. A new object is returned whenever requested and bound to this instance.
1086      * </p>
1087      * <dl>
1088      *   <dt><b>Final:</b></dt><dd>No</dd>
1089      * </dl>
1090      * @return The {@code <Locale>} dependency.
1091      * @throws org.jomc.ObjectManagementException if getting the dependency instance fails.
1092      */
1093     @SuppressWarnings({"unchecked", "unused", "PMD.UnnecessaryFullyQualifiedName"})
1094     @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.9", comments = "See http://www.jomc.org/jomc/1.9/jomc-tools-1.9" )
1095     private java.util.Locale getLocale()
1096     {
1097         final java.util.Locale _d = (java.util.Locale) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "Locale" );
1098         assert _d != null : "'Locale' dependency not found.";
1099         return _d;
1100     }
1101     /**
1102      * Gets the {@code <Model Context Factory Option>} dependency.
1103      * <p>
1104      *   This method returns the {@code <JOMC ⁑ CLI ⁑ ModelContextFactory Class Name Option>} object of the {@code <JOMC ⁑ CLI ⁑ Command Option>} specification at specification level 1.2.
1105      *   That specification does not apply to any scope. A new object is returned whenever requested and bound to this instance.
1106      * </p>
1107      * <dl>
1108      *   <dt><b>Final:</b></dt><dd>No</dd>
1109      * </dl>
1110      * @return The {@code <Model Context Factory Option>} dependency.
1111      * @throws org.jomc.ObjectManagementException if getting the dependency instance fails.
1112      */
1113     @SuppressWarnings({"unchecked", "unused", "PMD.UnnecessaryFullyQualifiedName"})
1114     @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.9", comments = "See http://www.jomc.org/jomc/1.9/jomc-tools-1.9" )
1115     private org.apache.commons.cli.Option getModelContextFactoryOption()
1116     {
1117         final org.apache.commons.cli.Option _d = (org.apache.commons.cli.Option) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "Model Context Factory Option" );
1118         assert _d != null : "'Model Context Factory Option' dependency not found.";
1119         return _d;
1120     }
1121     /**
1122      * Gets the {@code <Model Option>} dependency.
1123      * <p>
1124      *   This method returns the {@code <JOMC ⁑ CLI ⁑ Model Option>} object of the {@code <JOMC ⁑ CLI ⁑ Command Option>} specification at specification level 1.2.
1125      *   That specification does not apply to any scope. A new object is returned whenever requested and bound to this instance.
1126      * </p>
1127      * <dl>
1128      *   <dt><b>Final:</b></dt><dd>No</dd>
1129      * </dl>
1130      * @return The {@code <Model Option>} dependency.
1131      * @throws org.jomc.ObjectManagementException if getting the dependency instance fails.
1132      */
1133     @SuppressWarnings({"unchecked", "unused", "PMD.UnnecessaryFullyQualifiedName"})
1134     @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.9", comments = "See http://www.jomc.org/jomc/1.9/jomc-tools-1.9" )
1135     private org.apache.commons.cli.Option getModelOption()
1136     {
1137         final org.apache.commons.cli.Option _d = (org.apache.commons.cli.Option) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "Model Option" );
1138         assert _d != null : "'Model Option' dependency not found.";
1139         return _d;
1140     }
1141     /**
1142      * Gets the {@code <Modlet Location Option>} dependency.
1143      * <p>
1144      *   This method returns the {@code <JOMC ⁑ CLI ⁑ Modlet Location Option>} object of the {@code <JOMC ⁑ CLI ⁑ Command Option>} specification at specification level 1.2.
1145      *   That specification does not apply to any scope. A new object is returned whenever requested and bound to this instance.
1146      * </p>
1147      * <dl>
1148      *   <dt><b>Final:</b></dt><dd>No</dd>
1149      * </dl>
1150      * @return The {@code <Modlet Location Option>} dependency.
1151      * @throws org.jomc.ObjectManagementException if getting the dependency instance fails.
1152      */
1153     @SuppressWarnings({"unchecked", "unused", "PMD.UnnecessaryFullyQualifiedName"})
1154     @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.9", comments = "See http://www.jomc.org/jomc/1.9/jomc-tools-1.9" )
1155     private org.apache.commons.cli.Option getModletLocationOption()
1156     {
1157         final org.apache.commons.cli.Option _d = (org.apache.commons.cli.Option) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "Modlet Location Option" );
1158         assert _d != null : "'Modlet Location Option' dependency not found.";
1159         return _d;
1160     }
1161     /**
1162      * Gets the {@code <Modlet Schema System Id Option>} dependency.
1163      * <p>
1164      *   This method returns the {@code <JOMC ⁑ CLI ⁑ Modlet Schema System Id Option>} object of the {@code <JOMC ⁑ CLI ⁑ Command Option>} specification at specification level 1.2.
1165      *   That specification does not apply to any scope. A new object is returned whenever requested and bound to this instance.
1166      * </p>
1167      * <dl>
1168      *   <dt><b>Final:</b></dt><dd>No</dd>
1169      * </dl>
1170      * @return The {@code <Modlet Schema System Id Option>} dependency.
1171      * @throws org.jomc.ObjectManagementException if getting the dependency instance fails.
1172      */
1173     @SuppressWarnings({"unchecked", "unused", "PMD.UnnecessaryFullyQualifiedName"})
1174     @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.9", comments = "See http://www.jomc.org/jomc/1.9/jomc-tools-1.9" )
1175     private org.apache.commons.cli.Option getModletSchemaSystemIdOption()
1176     {
1177         final org.apache.commons.cli.Option _d = (org.apache.commons.cli.Option) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "Modlet Schema System Id Option" );
1178         assert _d != null : "'Modlet Schema System Id Option' dependency not found.";
1179         return _d;
1180     }
1181     /**
1182      * Gets the {@code <No Modlet Resource Validation>} dependency.
1183      * <p>
1184      *   This method returns the {@code <JOMC ⁑ CLI ⁑ No Modlet Resource Validation Option>} object of the {@code <JOMC ⁑ CLI ⁑ Command Option>} specification at specification level 1.2.
1185      *   That specification does not apply to any scope. A new object is returned whenever requested and bound to this instance.
1186      * </p>
1187      * <dl>
1188      *   <dt><b>Final:</b></dt><dd>No</dd>
1189      * </dl>
1190      * @return The {@code <No Modlet Resource Validation>} dependency.
1191      * @throws org.jomc.ObjectManagementException if getting the dependency instance fails.
1192      */
1193     @SuppressWarnings({"unchecked", "unused", "PMD.UnnecessaryFullyQualifiedName"})
1194     @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.9", comments = "See http://www.jomc.org/jomc/1.9/jomc-tools-1.9" )
1195     private org.apache.commons.cli.Option getNoModletResourceValidation()
1196     {
1197         final org.apache.commons.cli.Option _d = (org.apache.commons.cli.Option) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "No Modlet Resource Validation" );
1198         assert _d != null : "'No Modlet Resource Validation' dependency not found.";
1199         return _d;
1200     }
1201     /**
1202      * Gets the {@code <Platform Provider Location Option>} dependency.
1203      * <p>
1204      *   This method returns the {@code <JOMC ⁑ CLI ⁑ Platform Provider Location Option>} object of the {@code <JOMC ⁑ CLI ⁑ Command Option>} specification at specification level 1.2.
1205      *   That specification does not apply to any scope. A new object is returned whenever requested and bound to this instance.
1206      * </p>
1207      * <dl>
1208      *   <dt><b>Final:</b></dt><dd>No</dd>
1209      * </dl>
1210      * @return The {@code <Platform Provider Location Option>} dependency.
1211      * @throws org.jomc.ObjectManagementException if getting the dependency instance fails.
1212      */
1213     @SuppressWarnings({"unchecked", "unused", "PMD.UnnecessaryFullyQualifiedName"})
1214     @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.9", comments = "See http://www.jomc.org/jomc/1.9/jomc-tools-1.9" )
1215     private org.apache.commons.cli.Option getPlatformProviderLocationOption()
1216     {
1217         final org.apache.commons.cli.Option _d = (org.apache.commons.cli.Option) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "Platform Provider Location Option" );
1218         assert _d != null : "'Platform Provider Location Option' dependency not found.";
1219         return _d;
1220     }
1221     /**
1222      * Gets the {@code <Provider Location Option>} dependency.
1223      * <p>
1224      *   This method returns the {@code <JOMC ⁑ CLI ⁑ Provider Location Option>} object of the {@code <JOMC ⁑ CLI ⁑ Command Option>} specification at specification level 1.2.
1225      *   That specification does not apply to any scope. A new object is returned whenever requested and bound to this instance.
1226      * </p>
1227      * <dl>
1228      *   <dt><b>Final:</b></dt><dd>No</dd>
1229      * </dl>
1230      * @return The {@code <Provider Location Option>} dependency.
1231      * @throws org.jomc.ObjectManagementException if getting the dependency instance fails.
1232      */
1233     @SuppressWarnings({"unchecked", "unused", "PMD.UnnecessaryFullyQualifiedName"})
1234     @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.9", comments = "See http://www.jomc.org/jomc/1.9/jomc-tools-1.9" )
1235     private org.apache.commons.cli.Option getProviderLocationOption()
1236     {
1237         final org.apache.commons.cli.Option _d = (org.apache.commons.cli.Option) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "Provider Location Option" );
1238         assert _d != null : "'Provider Location Option' dependency not found.";
1239         return _d;
1240     }
1241     // </editor-fold>
1242     // SECTION-END
1243     // SECTION-START[Properties]
1244     // <editor-fold defaultstate="collapsed" desc=" Generated Properties ">
1245     /**
1246      * Gets the value of the {@code <Abbreviated Command Name>} property.
1247      * <p><dl>
1248      *   <dt><b>Final:</b></dt><dd>No</dd>
1249      * </dl></p>
1250      * @return Abbreviated name of the command.
1251      * @throws org.jomc.ObjectManagementException if getting the property instance fails.
1252      */
1253     @SuppressWarnings({"unchecked", "unused", "PMD.UnnecessaryFullyQualifiedName"})
1254     @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.9", comments = "See http://www.jomc.org/jomc/1.9/jomc-tools-1.9" )
1255     private java.lang.String getAbbreviatedCommandName()
1256     {
1257         final java.lang.String _p = (java.lang.String) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getProperty( this, "Abbreviated Command Name" );
1258         assert _p != null : "'Abbreviated Command Name' property not found.";
1259         return _p;
1260     }
1261     /**
1262      * Gets the value of the {@code <Application Modlet>} property.
1263      * <p><dl>
1264      *   <dt><b>Final:</b></dt><dd>Yes</dd>
1265      * </dl></p>
1266      * @return Name of the 'shaded' application modlet.
1267      * @throws org.jomc.ObjectManagementException if getting the property instance fails.
1268      */
1269     @SuppressWarnings({"unchecked", "unused", "PMD.UnnecessaryFullyQualifiedName"})
1270     @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.9", comments = "See http://www.jomc.org/jomc/1.9/jomc-tools-1.9" )
1271     private java.lang.String getApplicationModlet()
1272     {
1273         final java.lang.String _p = (java.lang.String) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getProperty( this, "Application Modlet" );
1274         assert _p != null : "'Application Modlet' property not found.";
1275         return _p;
1276     }
1277     /**
1278      * Gets the value of the {@code <Command Name>} property.
1279      * <p><dl>
1280      *   <dt><b>Final:</b></dt><dd>No</dd>
1281      * </dl></p>
1282      * @return Name of the command.
1283      * @throws org.jomc.ObjectManagementException if getting the property instance fails.
1284      */
1285     @SuppressWarnings({"unchecked", "unused", "PMD.UnnecessaryFullyQualifiedName"})
1286     @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.9", comments = "See http://www.jomc.org/jomc/1.9/jomc-tools-1.9" )
1287     private java.lang.String getCommandName()
1288     {
1289         final java.lang.String _p = (java.lang.String) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getProperty( this, "Command Name" );
1290         assert _p != null : "'Command Name' property not found.";
1291         return _p;
1292     }
1293     /**
1294      * Gets the value of the {@code <Modlet Excludes>} property.
1295      * <p><dl>
1296      *   <dt><b>Final:</b></dt><dd>Yes</dd>
1297      * </dl></p>
1298      * @return List of modlet names to exclude from any {@code META-INF/jomc-modlet.xml} files separated by {@code :}.
1299      * @throws org.jomc.ObjectManagementException if getting the property instance fails.
1300      */
1301     @SuppressWarnings({"unchecked", "unused", "PMD.UnnecessaryFullyQualifiedName"})
1302     @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.9", comments = "See http://www.jomc.org/jomc/1.9/jomc-tools-1.9" )
1303     private java.lang.String getModletExcludes()
1304     {
1305         final java.lang.String _p = (java.lang.String) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getProperty( this, "Modlet Excludes" );
1306         assert _p != null : "'Modlet Excludes' property not found.";
1307         return _p;
1308     }
1309     /**
1310      * Gets the value of the {@code <Provider Excludes>} property.
1311      * <p><dl>
1312      *   <dt><b>Final:</b></dt><dd>Yes</dd>
1313      * </dl></p>
1314      * @return List of providers to exclude from any {@code META-INF/services} files separated by {@code :}.
1315      * @throws org.jomc.ObjectManagementException if getting the property instance fails.
1316      */
1317     @SuppressWarnings({"unchecked", "unused", "PMD.UnnecessaryFullyQualifiedName"})
1318     @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.9", comments = "See http://www.jomc.org/jomc/1.9/jomc-tools-1.9" )
1319     private java.lang.String getProviderExcludes()
1320     {
1321         final java.lang.String _p = (java.lang.String) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getProperty( this, "Provider Excludes" );
1322         assert _p != null : "'Provider Excludes' property not found.";
1323         return _p;
1324     }
1325     /**
1326      * Gets the value of the {@code <Schema Excludes>} property.
1327      * <p><dl>
1328      *   <dt><b>Final:</b></dt><dd>Yes</dd>
1329      * </dl></p>
1330      * @return List of schema context-ids to exclude from any {@code META-INF/jomc-modlet.xml} files separated by {@code :}.
1331      * @throws org.jomc.ObjectManagementException if getting the property instance fails.
1332      */
1333     @SuppressWarnings({"unchecked", "unused", "PMD.UnnecessaryFullyQualifiedName"})
1334     @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.9", comments = "See http://www.jomc.org/jomc/1.9/jomc-tools-1.9" )
1335     private java.lang.String getSchemaExcludes()
1336     {
1337         final java.lang.String _p = (java.lang.String) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getProperty( this, "Schema Excludes" );
1338         assert _p != null : "'Schema Excludes' property not found.";
1339         return _p;
1340     }
1341     /**
1342      * Gets the value of the {@code <Service Excludes>} property.
1343      * <p><dl>
1344      *   <dt><b>Final:</b></dt><dd>Yes</dd>
1345      * </dl></p>
1346      * @return List of service classes to exclude from any {@code META-INF/jomc-modlet.xml} files separated by {@code :}.
1347      * @throws org.jomc.ObjectManagementException if getting the property instance fails.
1348      */
1349     @SuppressWarnings({"unchecked", "unused", "PMD.UnnecessaryFullyQualifiedName"})
1350     @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.9", comments = "See http://www.jomc.org/jomc/1.9/jomc-tools-1.9" )
1351     private java.lang.String getServiceExcludes()
1352     {
1353         final java.lang.String _p = (java.lang.String) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getProperty( this, "Service Excludes" );
1354         assert _p != null : "'Service Excludes' property not found.";
1355         return _p;
1356     }
1357     // </editor-fold>
1358     // SECTION-END
1359     // SECTION-START[Messages]
1360     // <editor-fold defaultstate="collapsed" desc=" Generated Messages ">
1361     /**
1362      * Gets the text of the {@code <Application Title>} message.
1363      * <p><dl>
1364      *   <dt><b>Languages:</b></dt>
1365      *     <dd>English (default)</dd>
1366      *   <dt><b>Final:</b></dt><dd>No</dd>
1367      * </dl></p>
1368      * @param locale The locale of the message to return.
1369      * @return The text of the {@code <Application Title>} message for {@code locale}.
1370      * @throws org.jomc.ObjectManagementException if getting the message instance fails.
1371      */
1372     @SuppressWarnings({"unchecked", "unused", "PMD.UnnecessaryFullyQualifiedName"})
1373     @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.9", comments = "See http://www.jomc.org/jomc/1.9/jomc-tools-1.9" )
1374     private String getApplicationTitle( final java.util.Locale locale )
1375     {
1376         final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "Application Title", locale );
1377         assert _m != null : "'Application Title' message not found.";
1378         return _m;
1379     }
1380     /**
1381      * Gets the text of the {@code <Cannot Process Message>} message.
1382      * <p><dl>
1383      *   <dt><b>Languages:</b></dt>
1384      *     <dd>English (default)</dd>
1385      *     <dd>Deutsch</dd>
1386      *   <dt><b>Final:</b></dt><dd>No</dd>
1387      * </dl></p>
1388      * @param locale The locale of the message to return.
1389      * @param itemInfo Format argument.
1390      * @param detailMessage Format argument.
1391      * @return The text of the {@code <Cannot Process Message>} message for {@code locale}.
1392      * @throws org.jomc.ObjectManagementException if getting the message instance fails.
1393      */
1394     @SuppressWarnings({"unchecked", "unused", "PMD.UnnecessaryFullyQualifiedName"})
1395     @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.9", comments = "See http://www.jomc.org/jomc/1.9/jomc-tools-1.9" )
1396     private String getCannotProcessMessage( final java.util.Locale locale, final java.lang.String itemInfo, final java.lang.String detailMessage )
1397     {
1398         final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "Cannot Process Message", locale, itemInfo, detailMessage );
1399         assert _m != null : "'Cannot Process Message' message not found.";
1400         return _m;
1401     }
1402     /**
1403      * Gets the text of the {@code <Classpath Element Info>} message.
1404      * <p><dl>
1405      *   <dt><b>Languages:</b></dt>
1406      *     <dd>English (default)</dd>
1407      *     <dd>Deutsch</dd>
1408      *   <dt><b>Final:</b></dt><dd>No</dd>
1409      * </dl></p>
1410      * @param locale The locale of the message to return.
1411      * @param classpathElement Format argument.
1412      * @return The text of the {@code <Classpath Element Info>} message for {@code locale}.
1413      * @throws org.jomc.ObjectManagementException if getting the message instance fails.
1414      */
1415     @SuppressWarnings({"unchecked", "unused", "PMD.UnnecessaryFullyQualifiedName"})
1416     @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.9", comments = "See http://www.jomc.org/jomc/1.9/jomc-tools-1.9" )
1417     private String getClasspathElementInfo( final java.util.Locale locale, final java.lang.String classpathElement )
1418     {
1419         final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "Classpath Element Info", locale, classpathElement );
1420         assert _m != null : "'Classpath Element Info' message not found.";
1421         return _m;
1422     }
1423     /**
1424      * Gets the text of the {@code <Classpath Element Not Found Warning>} message.
1425      * <p><dl>
1426      *   <dt><b>Languages:</b></dt>
1427      *     <dd>English (default)</dd>
1428      *     <dd>Deutsch</dd>
1429      *   <dt><b>Final:</b></dt><dd>No</dd>
1430      * </dl></p>
1431      * @param locale The locale of the message to return.
1432      * @param fileName Format argument.
1433      * @return The text of the {@code <Classpath Element Not Found Warning>} message for {@code locale}.
1434      * @throws org.jomc.ObjectManagementException if getting the message instance fails.
1435      */
1436     @SuppressWarnings({"unchecked", "unused", "PMD.UnnecessaryFullyQualifiedName"})
1437     @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.9", comments = "See http://www.jomc.org/jomc/1.9/jomc-tools-1.9" )
1438     private String getClasspathElementNotFoundWarning( final java.util.Locale locale, final java.lang.String fileName )
1439     {
1440         final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "Classpath Element Not Found Warning", locale, fileName );
1441         assert _m != null : "'Classpath Element Not Found Warning' message not found.";
1442         return _m;
1443     }
1444     /**
1445      * Gets the text of the {@code <Command Failure Message>} message.
1446      * <p><dl>
1447      *   <dt><b>Languages:</b></dt>
1448      *     <dd>English (default)</dd>
1449      *     <dd>Deutsch</dd>
1450      *   <dt><b>Final:</b></dt><dd>No</dd>
1451      * </dl></p>
1452      * @param locale The locale of the message to return.
1453      * @param toolName Format argument.
1454      * @return The text of the {@code <Command Failure Message>} message for {@code locale}.
1455      * @throws org.jomc.ObjectManagementException if getting the message instance fails.
1456      */
1457     @SuppressWarnings({"unchecked", "unused", "PMD.UnnecessaryFullyQualifiedName"})
1458     @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.9", comments = "See http://www.jomc.org/jomc/1.9/jomc-tools-1.9" )
1459     private String getCommandFailureMessage( final java.util.Locale locale, final java.lang.String toolName )
1460     {
1461         final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "Command Failure Message", locale, toolName );
1462         assert _m != null : "'Command Failure Message' message not found.";
1463         return _m;
1464     }
1465     /**
1466      * Gets the text of the {@code <Command Info Message>} message.
1467      * <p><dl>
1468      *   <dt><b>Languages:</b></dt>
1469      *     <dd>English (default)</dd>
1470      *     <dd>Deutsch</dd>
1471      *   <dt><b>Final:</b></dt><dd>No</dd>
1472      * </dl></p>
1473      * @param locale The locale of the message to return.
1474      * @param toolName Format argument.
1475      * @return The text of the {@code <Command Info Message>} message for {@code locale}.
1476      * @throws org.jomc.ObjectManagementException if getting the message instance fails.
1477      */
1478     @SuppressWarnings({"unchecked", "unused", "PMD.UnnecessaryFullyQualifiedName"})
1479     @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.9", comments = "See http://www.jomc.org/jomc/1.9/jomc-tools-1.9" )
1480     private String getCommandInfoMessage( final java.util.Locale locale, final java.lang.String toolName )
1481     {
1482         final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "Command Info Message", locale, toolName );
1483         assert _m != null : "'Command Info Message' message not found.";
1484         return _m;
1485     }
1486     /**
1487      * Gets the text of the {@code <Command Success Message>} message.
1488      * <p><dl>
1489      *   <dt><b>Languages:</b></dt>
1490      *     <dd>English (default)</dd>
1491      *     <dd>Deutsch</dd>
1492      *   <dt><b>Final:</b></dt><dd>No</dd>
1493      * </dl></p>
1494      * @param locale The locale of the message to return.
1495      * @param toolName Format argument.
1496      * @return The text of the {@code <Command Success Message>} message for {@code locale}.
1497      * @throws org.jomc.ObjectManagementException if getting the message instance fails.
1498      */
1499     @SuppressWarnings({"unchecked", "unused", "PMD.UnnecessaryFullyQualifiedName"})
1500     @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.9", comments = "See http://www.jomc.org/jomc/1.9/jomc-tools-1.9" )
1501     private String getCommandSuccessMessage( final java.util.Locale locale, final java.lang.String toolName )
1502     {
1503         final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "Command Success Message", locale, toolName );
1504         assert _m != null : "'Command Success Message' message not found.";
1505         return _m;
1506     }
1507     /**
1508      * Gets the text of the {@code <Default Log Level Info>} message.
1509      * <p><dl>
1510      *   <dt><b>Languages:</b></dt>
1511      *     <dd>English (default)</dd>
1512      *     <dd>Deutsch</dd>
1513      *   <dt><b>Final:</b></dt><dd>No</dd>
1514      * </dl></p>
1515      * @param locale The locale of the message to return.
1516      * @param defaultLogLevel Format argument.
1517      * @return The text of the {@code <Default Log Level Info>} message for {@code locale}.
1518      * @throws org.jomc.ObjectManagementException if getting the message instance fails.
1519      */
1520     @SuppressWarnings({"unchecked", "unused", "PMD.UnnecessaryFullyQualifiedName"})
1521     @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.9", comments = "See http://www.jomc.org/jomc/1.9/jomc-tools-1.9" )
1522     private String getDefaultLogLevelInfo( final java.util.Locale locale, final java.lang.String defaultLogLevel )
1523     {
1524         final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "Default Log Level Info", locale, defaultLogLevel );
1525         assert _m != null : "'Default Log Level Info' message not found.";
1526         return _m;
1527     }
1528     /**
1529      * Gets the text of the {@code <Document File Info>} message.
1530      * <p><dl>
1531      *   <dt><b>Languages:</b></dt>
1532      *     <dd>English (default)</dd>
1533      *     <dd>Deutsch</dd>
1534      *   <dt><b>Final:</b></dt><dd>No</dd>
1535      * </dl></p>
1536      * @param locale The locale of the message to return.
1537      * @param documentFile Format argument.
1538      * @return The text of the {@code <Document File Info>} message for {@code locale}.
1539      * @throws org.jomc.ObjectManagementException if getting the message instance fails.
1540      */
1541     @SuppressWarnings({"unchecked", "unused", "PMD.UnnecessaryFullyQualifiedName"})
1542     @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.9", comments = "See http://www.jomc.org/jomc/1.9/jomc-tools-1.9" )
1543     private String getDocumentFileInfo( final java.util.Locale locale, final java.lang.String documentFile )
1544     {
1545         final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "Document File Info", locale, documentFile );
1546         assert _m != null : "'Document File Info' message not found.";
1547         return _m;
1548     }
1549     /**
1550      * Gets the text of the {@code <Document File Not Found Warning>} message.
1551      * <p><dl>
1552      *   <dt><b>Languages:</b></dt>
1553      *     <dd>English (default)</dd>
1554      *     <dd>Deutsch</dd>
1555      *   <dt><b>Final:</b></dt><dd>No</dd>
1556      * </dl></p>
1557      * @param locale The locale of the message to return.
1558      * @param fileName Format argument.
1559      * @return The text of the {@code <Document File Not Found Warning>} message for {@code locale}.
1560      * @throws org.jomc.ObjectManagementException if getting the message instance fails.
1561      */
1562     @SuppressWarnings({"unchecked", "unused", "PMD.UnnecessaryFullyQualifiedName"})
1563     @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.9", comments = "See http://www.jomc.org/jomc/1.9/jomc-tools-1.9" )
1564     private String getDocumentFileNotFoundWarning( final java.util.Locale locale, final java.lang.String fileName )
1565     {
1566         final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "Document File Not Found Warning", locale, fileName );
1567         assert _m != null : "'Document File Not Found Warning' message not found.";
1568         return _m;
1569     }
1570     /**
1571      * Gets the text of the {@code <Excluded Modlet Info>} message.
1572      * <p><dl>
1573      *   <dt><b>Languages:</b></dt>
1574      *     <dd>English (default)</dd>
1575      *     <dd>Deutsch</dd>
1576      *   <dt><b>Final:</b></dt><dd>No</dd>
1577      * </dl></p>
1578      * @param locale The locale of the message to return.
1579      * @param resourceName Format argument.
1580      * @param modletIdentifier Format argument.
1581      * @return The text of the {@code <Excluded Modlet Info>} message for {@code locale}.
1582      * @throws org.jomc.ObjectManagementException if getting the message instance fails.
1583      */
1584     @SuppressWarnings({"unchecked", "unused", "PMD.UnnecessaryFullyQualifiedName"})
1585     @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.9", comments = "See http://www.jomc.org/jomc/1.9/jomc-tools-1.9" )
1586     private String getExcludedModletInfo( final java.util.Locale locale, final java.lang.String resourceName, final java.lang.String modletIdentifier )
1587     {
1588         final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "Excluded Modlet Info", locale, resourceName, modletIdentifier );
1589         assert _m != null : "'Excluded Modlet Info' message not found.";
1590         return _m;
1591     }
1592     /**
1593      * Gets the text of the {@code <Excluded Provider Info>} message.
1594      * <p><dl>
1595      *   <dt><b>Languages:</b></dt>
1596      *     <dd>English (default)</dd>
1597      *     <dd>Deutsch</dd>
1598      *   <dt><b>Final:</b></dt><dd>No</dd>
1599      * </dl></p>
1600      * @param locale The locale of the message to return.
1601      * @param resourceName Format argument.
1602      * @param providerName Format argument.
1603      * @return The text of the {@code <Excluded Provider Info>} message for {@code locale}.
1604      * @throws org.jomc.ObjectManagementException if getting the message instance fails.
1605      */
1606     @SuppressWarnings({"unchecked", "unused", "PMD.UnnecessaryFullyQualifiedName"})
1607     @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.9", comments = "See http://www.jomc.org/jomc/1.9/jomc-tools-1.9" )
1608     private String getExcludedProviderInfo( final java.util.Locale locale, final java.lang.String resourceName, final java.lang.String providerName )
1609     {
1610         final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "Excluded Provider Info", locale, resourceName, providerName );
1611         assert _m != null : "'Excluded Provider Info' message not found.";
1612         return _m;
1613     }
1614     /**
1615      * Gets the text of the {@code <Excluded Schema Info>} message.
1616      * <p><dl>
1617      *   <dt><b>Languages:</b></dt>
1618      *     <dd>English (default)</dd>
1619      *     <dd>Deutsch</dd>
1620      *   <dt><b>Final:</b></dt><dd>No</dd>
1621      * </dl></p>
1622      * @param locale The locale of the message to return.
1623      * @param resourceName Format argument.
1624      * @param contextId Format argument.
1625      * @return The text of the {@code <Excluded Schema Info>} message for {@code locale}.
1626      * @throws org.jomc.ObjectManagementException if getting the message instance fails.
1627      */
1628     @SuppressWarnings({"unchecked", "unused", "PMD.UnnecessaryFullyQualifiedName"})
1629     @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.9", comments = "See http://www.jomc.org/jomc/1.9/jomc-tools-1.9" )
1630     private String getExcludedSchemaInfo( final java.util.Locale locale, final java.lang.String resourceName, final java.lang.String contextId )
1631     {
1632         final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "Excluded Schema Info", locale, resourceName, contextId );
1633         assert _m != null : "'Excluded Schema Info' message not found.";
1634         return _m;
1635     }
1636     /**
1637      * Gets the text of the {@code <Excluded Service Info>} message.
1638      * <p><dl>
1639      *   <dt><b>Languages:</b></dt>
1640      *     <dd>English (default)</dd>
1641      *     <dd>Deutsch</dd>
1642      *   <dt><b>Final:</b></dt><dd>No</dd>
1643      * </dl></p>
1644      * @param locale The locale of the message to return.
1645      * @param resourceName Format argument.
1646      * @param serviceName Format argument.
1647      * @return The text of the {@code <Excluded Service Info>} message for {@code locale}.
1648      * @throws org.jomc.ObjectManagementException if getting the message instance fails.
1649      */
1650     @SuppressWarnings({"unchecked", "unused", "PMD.UnnecessaryFullyQualifiedName"})
1651     @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.9", comments = "See http://www.jomc.org/jomc/1.9/jomc-tools-1.9" )
1652     private String getExcludedServiceInfo( final java.util.Locale locale, final java.lang.String resourceName, final java.lang.String serviceName )
1653     {
1654         final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "Excluded Service Info", locale, resourceName, serviceName );
1655         assert _m != null : "'Excluded Service Info' message not found.";
1656         return _m;
1657     }
1658     /**
1659      * Gets the text of the {@code <Invalid Model Message>} message.
1660      * <p><dl>
1661      *   <dt><b>Languages:</b></dt>
1662      *     <dd>English (default)</dd>
1663      *     <dd>Deutsch</dd>
1664      *   <dt><b>Final:</b></dt><dd>No</dd>
1665      * </dl></p>
1666      * @param locale The locale of the message to return.
1667      * @param modelIdentifier Format argument.
1668      * @return The text of the {@code <Invalid Model Message>} message for {@code locale}.
1669      * @throws org.jomc.ObjectManagementException if getting the message instance fails.
1670      */
1671     @SuppressWarnings({"unchecked", "unused", "PMD.UnnecessaryFullyQualifiedName"})
1672     @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.9", comments = "See http://www.jomc.org/jomc/1.9/jomc-tools-1.9" )
1673     private String getInvalidModelMessage( final java.util.Locale locale, final java.lang.String modelIdentifier )
1674     {
1675         final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "Invalid Model Message", locale, modelIdentifier );
1676         assert _m != null : "'Invalid Model Message' message not found.";
1677         return _m;
1678     }
1679     /**
1680      * Gets the text of the {@code <Long Description Message>} message.
1681      * <p><dl>
1682      *   <dt><b>Languages:</b></dt>
1683      *     <dd>English (default)</dd>
1684      *   <dt><b>Final:</b></dt><dd>No</dd>
1685      * </dl></p>
1686      * @param locale The locale of the message to return.
1687      * @return The text of the {@code <Long Description Message>} message for {@code locale}.
1688      * @throws org.jomc.ObjectManagementException if getting the message instance fails.
1689      */
1690     @SuppressWarnings({"unchecked", "unused", "PMD.UnnecessaryFullyQualifiedName"})
1691     @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.9", comments = "See http://www.jomc.org/jomc/1.9/jomc-tools-1.9" )
1692     private String getLongDescriptionMessage( final java.util.Locale locale )
1693     {
1694         final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "Long Description Message", locale );
1695         assert _m != null : "'Long Description Message' message not found.";
1696         return _m;
1697     }
1698     /**
1699      * Gets the text of the {@code <Reading Message>} message.
1700      * <p><dl>
1701      *   <dt><b>Languages:</b></dt>
1702      *     <dd>English (default)</dd>
1703      *     <dd>Deutsch</dd>
1704      *   <dt><b>Final:</b></dt><dd>No</dd>
1705      * </dl></p>
1706      * @param locale The locale of the message to return.
1707      * @param locationInfo Format argument.
1708      * @return The text of the {@code <Reading Message>} message for {@code locale}.
1709      * @throws org.jomc.ObjectManagementException if getting the message instance fails.
1710      */
1711     @SuppressWarnings({"unchecked", "unused", "PMD.UnnecessaryFullyQualifiedName"})
1712     @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.9", comments = "See http://www.jomc.org/jomc/1.9/jomc-tools-1.9" )
1713     private String getReadingMessage( final java.util.Locale locale, final java.lang.String locationInfo )
1714     {
1715         final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "Reading Message", locale, locationInfo );
1716         assert _m != null : "'Reading Message' message not found.";
1717         return _m;
1718     }
1719     /**
1720      * Gets the text of the {@code <Separator>} message.
1721      * <p><dl>
1722      *   <dt><b>Languages:</b></dt>
1723      *     <dd>English (default)</dd>
1724      *   <dt><b>Final:</b></dt><dd>No</dd>
1725      * </dl></p>
1726      * @param locale The locale of the message to return.
1727      * @return The text of the {@code <Separator>} message for {@code locale}.
1728      * @throws org.jomc.ObjectManagementException if getting the message instance fails.
1729      */
1730     @SuppressWarnings({"unchecked", "unused", "PMD.UnnecessaryFullyQualifiedName"})
1731     @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.9", comments = "See http://www.jomc.org/jomc/1.9/jomc-tools-1.9" )
1732     private String getSeparator( final java.util.Locale locale )
1733     {
1734         final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "Separator", locale );
1735         assert _m != null : "'Separator' message not found.";
1736         return _m;
1737     }
1738     /**
1739      * Gets the text of the {@code <Short Description Message>} message.
1740      * <p><dl>
1741      *   <dt><b>Languages:</b></dt>
1742      *     <dd>English (default)</dd>
1743      *   <dt><b>Final:</b></dt><dd>No</dd>
1744      * </dl></p>
1745      * @param locale The locale of the message to return.
1746      * @return The text of the {@code <Short Description Message>} message for {@code locale}.
1747      * @throws org.jomc.ObjectManagementException if getting the message instance fails.
1748      */
1749     @SuppressWarnings({"unchecked", "unused", "PMD.UnnecessaryFullyQualifiedName"})
1750     @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.9", comments = "See http://www.jomc.org/jomc/1.9/jomc-tools-1.9" )
1751     private String getShortDescriptionMessage( final java.util.Locale locale )
1752     {
1753         final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "Short Description Message", locale );
1754         assert _m != null : "'Short Description Message' message not found.";
1755         return _m;
1756     }
1757     // </editor-fold>
1758     // SECTION-END
1759     // SECTION-START[Generated Command]
1760     // <editor-fold defaultstate="collapsed" desc=" Generated Options ">
1761     /**
1762      * Gets the options of the command.
1763      * <p><strong>Options:</strong>
1764      *   <table border="1" width="100%" cellpadding="3" cellspacing="0">
1765      *     <tr class="TableSubHeadingColor">
1766      *       <th align="left" scope="col" nowrap><b>Specification</b></th>
1767      *       <th align="left" scope="col" nowrap><b>Implementation</b></th>
1768      *     </tr>
1769      *     <tr class="TableRow">
1770      *       <td align="left" valign="top" nowrap>JOMC ⁑ CLI ⁑ Command Option {@code (org.apache.commons.cli.Option)} @ 1.2</td>
1771      *       <td align="left" valign="top" nowrap>JOMC ⁑ CLI ⁑ Classpath Option</td>
1772      *     </tr>
1773      *     <tr class="TableRow">
1774      *       <td align="left" valign="top" nowrap>JOMC ⁑ CLI ⁑ Command Option {@code (org.apache.commons.cli.Option)} @ 1.2</td>
1775      *       <td align="left" valign="top" nowrap>JOMC ⁑ CLI ⁑ Documents Option</td>
1776      *     </tr>
1777      *     <tr class="TableRow">
1778      *       <td align="left" valign="top" nowrap>JOMC ⁑ CLI ⁑ Command Option {@code (org.apache.commons.cli.Option)} @ 1.2</td>
1779      *       <td align="left" valign="top" nowrap>JOMC ⁑ CLI ⁑ ModelContextFactory Class Name Option</td>
1780      *     </tr>
1781      *     <tr class="TableRow">
1782      *       <td align="left" valign="top" nowrap>JOMC ⁑ CLI ⁑ Command Option {@code (org.apache.commons.cli.Option)} @ 1.2</td>
1783      *       <td align="left" valign="top" nowrap>JOMC ⁑ CLI ⁑ Model Option</td>
1784      *     </tr>
1785      *     <tr class="TableRow">
1786      *       <td align="left" valign="top" nowrap>JOMC ⁑ CLI ⁑ Command Option {@code (org.apache.commons.cli.Option)} @ 1.2</td>
1787      *       <td align="left" valign="top" nowrap>JOMC ⁑ CLI ⁑ Modlet Location Option</td>
1788      *     </tr>
1789      *     <tr class="TableRow">
1790      *       <td align="left" valign="top" nowrap>JOMC ⁑ CLI ⁑ Command Option {@code (org.apache.commons.cli.Option)} @ 1.2</td>
1791      *       <td align="left" valign="top" nowrap>JOMC ⁑ CLI ⁑ Modlet Schema System Id Option</td>
1792      *     </tr>
1793      *     <tr class="TableRow">
1794      *       <td align="left" valign="top" nowrap>JOMC ⁑ CLI ⁑ Command Option {@code (org.apache.commons.cli.Option)} @ 1.2</td>
1795      *       <td align="left" valign="top" nowrap>JOMC ⁑ CLI ⁑ No Modlet Resource Validation Option</td>
1796      *     </tr>
1797      *     <tr class="TableRow">
1798      *       <td align="left" valign="top" nowrap>JOMC ⁑ CLI ⁑ Command Option {@code (org.apache.commons.cli.Option)} @ 1.2</td>
1799      *       <td align="left" valign="top" nowrap>JOMC ⁑ CLI ⁑ Platform Provider Location Option</td>
1800      *     </tr>
1801      *     <tr class="TableRow">
1802      *       <td align="left" valign="top" nowrap>JOMC ⁑ CLI ⁑ Command Option {@code (org.apache.commons.cli.Option)} @ 1.2</td>
1803      *       <td align="left" valign="top" nowrap>JOMC ⁑ CLI ⁑ Provider Location Option</td>
1804      *     </tr>
1805      *   </table>
1806      * </p>
1807      * @return The options of the command.
1808      */
1809     @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.9", comments = "See http://www.jomc.org/jomc/1.9/jomc-tools-1.9" )
1810     @Override
1811     public org.apache.commons.cli.Options getOptions()
1812     {
1813         final org.apache.commons.cli.Options options = new org.apache.commons.cli.Options();
1814         options.addOption( this.getClasspathOption() );
1815         options.addOption( this.getDocumentsOption() );
1816         options.addOption( this.getModelContextFactoryOption() );
1817         options.addOption( this.getModelOption() );
1818         options.addOption( this.getModletLocationOption() );
1819         options.addOption( this.getModletSchemaSystemIdOption() );
1820         options.addOption( this.getNoModletResourceValidation() );
1821         options.addOption( this.getPlatformProviderLocationOption() );
1822         options.addOption( this.getProviderLocationOption() );
1823         return options;
1824     }
1825     // </editor-fold>
1826     // SECTION-END
1827 
1828 }