EMMA Coverage Report (generated Wed Feb 03 01:24:19 UTC 2010)
[all classes][org.jomc.cli.commands]

COVERAGE SUMMARY FOR SOURCE FILE [ValidateJavaClassesCommand.java]

nameclass, %method, %block, %line, %
ValidateJavaClassesCommand.java100% (1/1)29%  (9/31)27%  (207/761)37%  (41.5/113)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class ValidateJavaClassesCommand100% (1/1)29%  (9/31)27%  (207/761)37%  (41.5/113)
getAbbreviatedCommandName (): String 0%   (0/1)0%   (0/20)0%   (0/3)
getApplicationTitleMessage (Locale): String 0%   (0/1)0%   (0/22)0%   (0/3)
getCannotProcessMessage (Locale, String, String): String 0%   (0/1)0%   (0/30)0%   (0/3)
getClasspathElementMessage (Locale, String): String 0%   (0/1)0%   (0/26)0%   (0/3)
getClasspathOption (): Option 0%   (0/1)0%   (0/20)0%   (0/3)
getDefaultLogLevelInfoMessage (Locale, String): String 0%   (0/1)0%   (0/26)0%   (0/3)
getDocumentFileMessage (Locale, String): String 0%   (0/1)0%   (0/26)0%   (0/3)
getDocumentsOption (): Option 0%   (0/1)0%   (0/20)0%   (0/3)
getInvalidModelMessage (Locale): String 0%   (0/1)0%   (0/22)0%   (0/3)
getLongDescriptionMessage (Locale): String 0%   (0/1)0%   (0/22)0%   (0/3)
getModuleLocationOption (): Option 0%   (0/1)0%   (0/20)0%   (0/3)
getModulesReportMessage (Locale): String 0%   (0/1)0%   (0/22)0%   (0/3)
getNoClasspathResolutionOption (): Option 0%   (0/1)0%   (0/20)0%   (0/3)
getNoModelProcessingOption (): Option 0%   (0/1)0%   (0/20)0%   (0/3)
getSchemaLocationOption (): Option 0%   (0/1)0%   (0/20)0%   (0/3)
getSeparatorMessage (Locale): String 0%   (0/1)0%   (0/22)0%   (0/3)
getServiceLocationOption (): Option 0%   (0/1)0%   (0/20)0%   (0/3)
getShortDescriptionMessage (Locale): String 0%   (0/1)0%   (0/22)0%   (0/3)
getStartingModuleProcessingMessage (Locale, String, String): String 0%   (0/1)0%   (0/30)0%   (0/3)
getToolFailureMessage (Locale, String): String 0%   (0/1)0%   (0/26)0%   (0/3)
getToolSuccessMessage (Locale, String): String 0%   (0/1)0%   (0/26)0%   (0/3)
getTransformerLocationOption (): Option 0%   (0/1)0%   (0/20)0%   (0/3)
<static initializer> 100% (1/1)75%  (6/8)75%  (0.8/1)
getCommandName (): String 100% (1/1)75%  (15/20)91%  (2.7/3)
getLocale (): Locale 100% (1/1)75%  (15/20)91%  (2.7/3)
getModuleNameOption (): Option 100% (1/1)75%  (15/20)91%  (2.7/3)
executeCommand (CommandLine): int 100% (1/1)80%  (101/126)85%  (22/26)
getMissingModuleMessage (Locale, String): String 100% (1/1)81%  (21/26)93%  (2.8/3)
getStartingProcessingMessage (Locale, String): String 100% (1/1)81%  (21/26)93%  (2.8/3)
ValidateJavaClassesCommand (): void 100% (1/1)100% (3/3)100% (2/2)
getOptions (): Options 100% (1/1)100% (10/10)100% (3/3)

1// SECTION-START[License Header]
2// <editor-fold defaultstate="collapsed" desc=" Generated License ">
3/*
4 *   Copyright (c) 2010 The JOMC Project
5 *   Copyright (c) 2005 Christian Schulte <cs@jomc.org>
6 *   All rights reserved.
7 *
8 *   Redistribution and use in source and binary forms, with or without
9 *   modification, are permitted provided that the following conditions
10 *   are met:
11 *
12 *     o Redistributions of source code must retain the above copyright
13 *       notice, this list of conditions and the following disclaimer.
14 *
15 *     o Redistributions in binary form must reproduce the above copyright
16 *       notice, this list of conditions and the following disclaimer in
17 *       the documentation and/or other materials provided with the
18 *       distribution.
19 *
20 *   THIS SOFTWARE IS PROVIDED BY THE JOMC PROJECT AND CONTRIBUTORS "AS IS"
21 *   AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
22 *   THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
23 *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE JOMC PROJECT OR
24 *   CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
25 *   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
26 *   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
27 *   OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
28 *   WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
29 *   OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
30 *   ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 *
32 *   $Id: ValidateJavaClassesCommand.java 1452 2010-02-02 05:35:30Z schulte2005 $
33 *
34 */
35// </editor-fold>
36// SECTION-END
37package org.jomc.cli.commands;
38 
39import java.util.logging.Level;
40import javax.xml.bind.JAXBContext;
41import javax.xml.bind.Marshaller;
42import javax.xml.bind.Unmarshaller;
43import javax.xml.bind.util.JAXBSource;
44import org.apache.commons.cli.CommandLine;
45import org.apache.commons.cli.Options;
46import org.jomc.model.ModelContext;
47import org.jomc.model.ModelValidationReport;
48import org.jomc.model.Module;
49import org.jomc.model.Modules;
50import org.jomc.model.ObjectFactory;
51import org.jomc.tools.JavaClasses;
52 
53// SECTION-START[Documentation]
54// <editor-fold defaultstate="collapsed" desc=" Generated Documentation ">
55/**
56 * Command line interface for validating Java classes with the {@code JavaClasses} tool.
57 * <p><b>Specifications</b><ul>
58 * <li>{@code org.jomc.cli.Command} {@code 1.0} {@code Multiton}</li>
59 * </ul></p>
60 * <p><b>Properties</b><ul>
61 * <li>"{@link #getAbbreviatedCommandName abbreviatedCommandName}"
62 * <blockquote>Property of type {@code java.lang.String}.
63 * <p>Abbreviated name of the command.</p>
64 * </blockquote></li>
65 * <li>"{@link #getCommandName commandName}"
66 * <blockquote>Property of type {@code java.lang.String}.
67 * <p>Name of the command.</p>
68 * </blockquote></li>
69 * </ul></p>
70 * <p><b>Dependencies</b><ul>
71 * <li>"{@link #getClasspathOption ClasspathOption}"<blockquote>
72 * Dependency on {@code org.apache.commons.cli.Option} bound to an instance.</blockquote></li>
73 * <li>"{@link #getDocumentsOption DocumentsOption}"<blockquote>
74 * Dependency on {@code org.apache.commons.cli.Option} bound to an instance.</blockquote></li>
75 * <li>"{@link #getLocale Locale}"<blockquote>
76 * Dependency on {@code java.util.Locale} at specification level 1.1 bound to an instance.</blockquote></li>
77 * <li>"{@link #getModuleLocationOption ModuleLocationOption}"<blockquote>
78 * Dependency on {@code org.apache.commons.cli.Option} bound to an instance.</blockquote></li>
79 * <li>"{@link #getModuleNameOption ModuleNameOption}"<blockquote>
80 * Dependency on {@code org.apache.commons.cli.Option} bound to an instance.</blockquote></li>
81 * <li>"{@link #getNoClasspathResolutionOption NoClasspathResolutionOption}"<blockquote>
82 * Dependency on {@code org.apache.commons.cli.Option} bound to an instance.</blockquote></li>
83 * <li>"{@link #getNoModelProcessingOption NoModelProcessingOption}"<blockquote>
84 * Dependency on {@code org.apache.commons.cli.Option} bound to an instance.</blockquote></li>
85 * <li>"{@link #getSchemaLocationOption SchemaLocationOption}"<blockquote>
86 * Dependency on {@code org.apache.commons.cli.Option} bound to an instance.</blockquote></li>
87 * <li>"{@link #getServiceLocationOption ServiceLocationOption}"<blockquote>
88 * Dependency on {@code org.apache.commons.cli.Option} bound to an instance.</blockquote></li>
89 * <li>"{@link #getTransformerLocationOption TransformerLocationOption}"<blockquote>
90 * Dependency on {@code org.apache.commons.cli.Option} bound to an instance.</blockquote></li>
91 * </ul></p>
92 * <p><b>Messages</b><ul>
93 * <li>"{@link #getApplicationTitleMessage applicationTitle}"<table>
94 * <tr><td valign="top">English:</td><td valign="top"><pre>JOMC Version 1.0-alpha-16 Build 2010-02-02T05:28:08+0000</pre></td></tr>
95 * </table>
96 * <li>"{@link #getCannotProcessMessage cannotProcess}"<table>
97 * <tr><td valign="top">English:</td><td valign="top"><pre>Cannot process ''{0}'': {1}</pre></td></tr>
98 * <tr><td valign="top">Deutsch:</td><td valign="top"><pre>Kann ''{0}'' nicht verarbeiten: {1}</pre></td></tr>
99 * </table>
100 * <li>"{@link #getClasspathElementMessage classpathElement}"<table>
101 * <tr><td valign="top">English:</td><td valign="top"><pre>Classpath element: ''{0}''</pre></td></tr>
102 * <tr><td valign="top">Deutsch:</td><td valign="top"><pre>Klassenpfad-Element: ''{0}''</pre></td></tr>
103 * </table>
104 * <li>"{@link #getDefaultLogLevelInfoMessage defaultLogLevelInfo}"<table>
105 * <tr><td valign="top">English:</td><td valign="top"><pre>Default log level: ''{0}''</pre></td></tr>
106 * <tr><td valign="top">Deutsch:</td><td valign="top"><pre>Standard-Protokollierungsstufe: ''{0}''</pre></td></tr>
107 * </table>
108 * <li>"{@link #getDocumentFileMessage documentFile}"<table>
109 * <tr><td valign="top">English:</td><td valign="top"><pre>Document file: ''{0}''</pre></td></tr>
110 * <tr><td valign="top">Deutsch:</td><td valign="top"><pre>Dokument-Datei: ''{0}''</pre></td></tr>
111 * </table>
112 * <li>"{@link #getInvalidModelMessage invalidModel}"<table>
113 * <tr><td valign="top">English:</td><td valign="top"><pre>Invalid model.</pre></td></tr>
114 * <tr><td valign="top">Deutsch:</td><td valign="top"><pre>Ung&uuml;ltiges Modell.</pre></td></tr>
115 * </table>
116 * <li>"{@link #getLongDescriptionMessage longDescription}"<table>
117 * <tr><td valign="top">English:</td><td valign="top"><pre>Example:
118 *   jomc validate-java-classes -cp target/classes \
119 *                              -df examples/xml/jomc-cli.xml \
120 *                              -v</pre></td></tr>
121 * <tr><td valign="top">Deutsch:</td><td valign="top"><pre>Beispiel:
122 *   jomc validate-java-classes -cp target/classes \
123 *                              -df examples/xml/jomc-cli.xml \
124 *                              -v</pre></td></tr>
125 * </table>
126 * <li>"{@link #getMissingModuleMessage missingModule}"<table>
127 * <tr><td valign="top">English:</td><td valign="top"><pre>Module ''{0}'' not found.</pre></td></tr>
128 * <tr><td valign="top">Deutsch:</td><td valign="top"><pre>Modul ''{0}'' nicht gefunden.</pre></td></tr>
129 * </table>
130 * <li>"{@link #getModulesReportMessage modulesReport}"<table>
131 * <tr><td valign="top">English:</td><td valign="top"><pre>Modules</pre></td></tr>
132 * <tr><td valign="top">Deutsch:</td><td valign="top"><pre>Module</pre></td></tr>
133 * </table>
134 * <li>"{@link #getSeparatorMessage separator}"<table>
135 * <tr><td valign="top">English:</td><td valign="top"><pre>--------------------------------------------------------------------------------</pre></td></tr>
136 * </table>
137 * <li>"{@link #getShortDescriptionMessage shortDescription}"<table>
138 * <tr><td valign="top">English:</td><td valign="top"><pre>Validates Java class files.</pre></td></tr>
139 * <tr><td valign="top">Deutsch:</td><td valign="top"><pre>Pr&uuml;ft Java Klassendateien.</pre></td></tr>
140 * </table>
141 * <li>"{@link #getStartingModuleProcessingMessage startingModuleProcessing}"<table>
142 * <tr><td valign="top">English:</td><td valign="top"><pre>Executing command {0} with module ''{1}'' ...</pre></td></tr>
143 * <tr><td valign="top">Deutsch:</td><td valign="top"><pre>F&uuml;hrt Befehl {0} mit Modul ''{1}'' aus ... </pre></td></tr>
144 * </table>
145 * <li>"{@link #getStartingProcessingMessage startingProcessing}"<table>
146 * <tr><td valign="top">English:</td><td valign="top"><pre>Executing command {0} ...</pre></td></tr>
147 * <tr><td valign="top">Deutsch:</td><td valign="top"><pre>F&uuml;hrt Befehl {0} aus ... </pre></td></tr>
148 * </table>
149 * <li>"{@link #getToolFailureMessage toolFailure}"<table>
150 * <tr><td valign="top">English:</td><td valign="top"><pre>{0} failure.</pre></td></tr>
151 * <tr><td valign="top">Deutsch:</td><td valign="top"><pre>{0} fehlgeschlagen.</pre></td></tr>
152 * </table>
153 * <li>"{@link #getToolSuccessMessage toolSuccess}"<table>
154 * <tr><td valign="top">English:</td><td valign="top"><pre>{0} successful.</pre></td></tr>
155 * <tr><td valign="top">Deutsch:</td><td valign="top"><pre>{0} erfolgreich.</pre></td></tr>
156 * </table>
157 * </ul></p>
158 *
159 * @author <a href="mailto:cs@jomc.org">Christian Schulte</a> 1.0
160 * @version $Id: ValidateJavaClassesCommand.java 1452 2010-02-02 05:35:30Z schulte2005 $
161 */
162// </editor-fold>
163// SECTION-END
164// SECTION-START[Annotations]
165// <editor-fold defaultstate="collapsed" desc=" Generated Annotations ">
166@javax.annotation.Generated( value = "org.jomc.tools.JavaSources",
167                             comments = "See http://jomc.sourceforge.net/jomc/1.0-alpha-16/jomc-tools" )
168// </editor-fold>
169// SECTION-END
170public final class ValidateJavaClassesCommand extends AbstractJomcCommand
171{
172    // SECTION-START[Command]
173 
174    /** Options of the instance. */
175    private Options options;
176 
177    @Override
178    public Options getOptions()
179    {
180        if ( this.options == null )
181        {
182            this.options = super.getOptions();
183        }
184 
185        return this.options;
186    }
187 
188    public int executeCommand( final CommandLine commandLine ) throws Exception
189    {
190        final ClassLoader classLoader = this.getClassLoader( commandLine );
191        final ModelContext context = this.getModelContext( classLoader );
192        final Modules modules = this.getModules( context, commandLine );
193        final JAXBContext jaxbContext = context.createContext();
194        final Marshaller marshaller = context.createMarshaller();
195        final Unmarshaller unmarshaller = context.createUnmarshaller();
196        final ModelValidationReport validationReport =
197            context.validateModel( new JAXBSource( jaxbContext, new ObjectFactory().createModules( modules ) ) );
198 
199        this.log( validationReport, marshaller );
200 
201        if ( validationReport.isModelValid() )
202        {
203            final JavaClasses tool = this.getJavaClasses();
204            tool.setModules( modules );
205 
206            if ( commandLine.hasOption( this.getModuleNameOption().getOpt() ) )
207            {
208                final String moduleName = commandLine.getOptionValue( this.getModuleNameOption().getOpt() );
209                final Module module = tool.getModules().getModule( moduleName );
210 
211                if ( module != null )
212                {
213                    if ( this.isLoggable( Level.INFO ) )
214                    {
215                        this.log( Level.INFO, this.getStartingModuleProcessingMessage(
216                            this.getLocale(), this.getCommandName(), module.getName() ), null );
217 
218                    }
219 
220                    tool.validateClasses( module, unmarshaller, classLoader );
221                }
222                else if ( this.isLoggable( Level.WARNING ) )
223                {
224                    this.log( Level.WARNING, this.getMissingModuleMessage( this.getLocale(), moduleName ), null );
225                }
226            }
227            else
228            {
229                if ( this.isLoggable( Level.INFO ) )
230                {
231                    this.log( Level.INFO, this.getStartingProcessingMessage(
232                        this.getLocale(), this.getCommandName() ), null );
233 
234                }
235 
236                tool.validateClasses( unmarshaller, classLoader );
237            }
238 
239            return STATUS_SUCCESS;
240        }
241 
242        return STATUS_FAILURE;
243    }
244 
245    // SECTION-END
246    // SECTION-START[ValidateJavaClassesCommand]
247    // SECTION-END
248    // SECTION-START[Constructors]
249    // <editor-fold defaultstate="collapsed" desc=" Generated Constructors ">
250 
251    /** Creates a new {@code ValidateJavaClassesCommand} instance. */
252    @javax.annotation.Generated( value = "org.jomc.tools.JavaSources",
253                                 comments = "See http://jomc.sourceforge.net/jomc/1.0-alpha-16/jomc-tools" )
254    public ValidateJavaClassesCommand()
255    {
256        // SECTION-START[Default Constructor]
257        super();
258        // SECTION-END
259    }
260    // </editor-fold>
261    // SECTION-END
262    // SECTION-START[Dependencies]
263    // <editor-fold defaultstate="collapsed" desc=" Generated Dependencies ">
264 
265    /**
266     * Gets the {@code ClasspathOption} dependency.
267     * <p>This method returns the "{@code JOMC CLI Classpath Option}" object of the {@code org.apache.commons.cli.Option} specification.</p>
268     * <p>That specification does not apply to any scope. A new object is returned whenever requested and bound to this instance.</p>
269     * @return The {@code ClasspathOption} dependency.
270     * @throws org.jomc.ObjectManagementException if getting the dependency instance fails.
271     */
272    @javax.annotation.Generated( value = "org.jomc.tools.JavaSources",
273                                 comments = "See http://jomc.sourceforge.net/jomc/1.0-alpha-16/jomc-tools" )
274    private org.apache.commons.cli.Option getClasspathOption()
275    {
276        final org.apache.commons.cli.Option _d = (org.apache.commons.cli.Option) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "ClasspathOption" );
277        assert _d != null : "'ClasspathOption' dependency not found.";
278        return _d;
279    }
280 
281    /**
282     * Gets the {@code DocumentsOption} dependency.
283     * <p>This method returns the "{@code JOMC CLI Documents Option}" object of the {@code org.apache.commons.cli.Option} specification.</p>
284     * <p>That specification does not apply to any scope. A new object is returned whenever requested and bound to this instance.</p>
285     * @return The {@code DocumentsOption} dependency.
286     * @throws org.jomc.ObjectManagementException if getting the dependency instance fails.
287     */
288    @javax.annotation.Generated( value = "org.jomc.tools.JavaSources",
289                                 comments = "See http://jomc.sourceforge.net/jomc/1.0-alpha-16/jomc-tools" )
290    private org.apache.commons.cli.Option getDocumentsOption()
291    {
292        final org.apache.commons.cli.Option _d = (org.apache.commons.cli.Option) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "DocumentsOption" );
293        assert _d != null : "'DocumentsOption' dependency not found.";
294        return _d;
295    }
296 
297    /**
298     * Gets the {@code Locale} dependency.
299     * <p>This method returns the "{@code default}" object of the {@code java.util.Locale} specification at specification level 1.1.</p>
300     * <p>That specification does not apply to any scope. A new object is returned whenever requested and bound to this instance.</p>
301     * @return The {@code Locale} dependency.
302     * @throws org.jomc.ObjectManagementException if getting the dependency instance fails.
303     */
304    @javax.annotation.Generated( value = "org.jomc.tools.JavaSources",
305                                 comments = "See http://jomc.sourceforge.net/jomc/1.0-alpha-16/jomc-tools" )
306    private java.util.Locale getLocale()
307    {
308        final java.util.Locale _d = (java.util.Locale) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "Locale" );
309        assert _d != null : "'Locale' dependency not found.";
310        return _d;
311    }
312 
313    /**
314     * Gets the {@code ModuleLocationOption} dependency.
315     * <p>This method returns the "{@code JOMC CLI Module Location Option}" object of the {@code org.apache.commons.cli.Option} specification.</p>
316     * <p>That specification does not apply to any scope. A new object is returned whenever requested and bound to this instance.</p>
317     * @return The {@code ModuleLocationOption} dependency.
318     * @throws org.jomc.ObjectManagementException if getting the dependency instance fails.
319     */
320    @javax.annotation.Generated( value = "org.jomc.tools.JavaSources",
321                                 comments = "See http://jomc.sourceforge.net/jomc/1.0-alpha-16/jomc-tools" )
322    private org.apache.commons.cli.Option getModuleLocationOption()
323    {
324        final org.apache.commons.cli.Option _d = (org.apache.commons.cli.Option) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "ModuleLocationOption" );
325        assert _d != null : "'ModuleLocationOption' dependency not found.";
326        return _d;
327    }
328 
329    /**
330     * Gets the {@code ModuleNameOption} dependency.
331     * <p>This method returns the "{@code JOMC CLI Module Name Option}" object of the {@code org.apache.commons.cli.Option} specification.</p>
332     * <p>That specification does not apply to any scope. A new object is returned whenever requested and bound to this instance.</p>
333     * @return The {@code ModuleNameOption} dependency.
334     * @throws org.jomc.ObjectManagementException if getting the dependency instance fails.
335     */
336    @javax.annotation.Generated( value = "org.jomc.tools.JavaSources",
337                                 comments = "See http://jomc.sourceforge.net/jomc/1.0-alpha-16/jomc-tools" )
338    private org.apache.commons.cli.Option getModuleNameOption()
339    {
340        final org.apache.commons.cli.Option _d = (org.apache.commons.cli.Option) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "ModuleNameOption" );
341        assert _d != null : "'ModuleNameOption' dependency not found.";
342        return _d;
343    }
344 
345    /**
346     * Gets the {@code NoClasspathResolutionOption} dependency.
347     * <p>This method returns the "{@code JOMC CLI No Classpath Resolution Option}" object of the {@code org.apache.commons.cli.Option} specification.</p>
348     * <p>That specification does not apply to any scope. A new object is returned whenever requested and bound to this instance.</p>
349     * @return The {@code NoClasspathResolutionOption} dependency.
350     * @throws org.jomc.ObjectManagementException if getting the dependency instance fails.
351     */
352    @javax.annotation.Generated( value = "org.jomc.tools.JavaSources",
353                                 comments = "See http://jomc.sourceforge.net/jomc/1.0-alpha-16/jomc-tools" )
354    private org.apache.commons.cli.Option getNoClasspathResolutionOption()
355    {
356        final org.apache.commons.cli.Option _d = (org.apache.commons.cli.Option) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "NoClasspathResolutionOption" );
357        assert _d != null : "'NoClasspathResolutionOption' dependency not found.";
358        return _d;
359    }
360 
361    /**
362     * Gets the {@code NoModelProcessingOption} dependency.
363     * <p>This method returns the "{@code JOMC CLI No Model Processing Option}" object of the {@code org.apache.commons.cli.Option} specification.</p>
364     * <p>That specification does not apply to any scope. A new object is returned whenever requested and bound to this instance.</p>
365     * @return The {@code NoModelProcessingOption} dependency.
366     * @throws org.jomc.ObjectManagementException if getting the dependency instance fails.
367     */
368    @javax.annotation.Generated( value = "org.jomc.tools.JavaSources",
369                                 comments = "See http://jomc.sourceforge.net/jomc/1.0-alpha-16/jomc-tools" )
370    private org.apache.commons.cli.Option getNoModelProcessingOption()
371    {
372        final org.apache.commons.cli.Option _d = (org.apache.commons.cli.Option) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "NoModelProcessingOption" );
373        assert _d != null : "'NoModelProcessingOption' dependency not found.";
374        return _d;
375    }
376 
377    /**
378     * Gets the {@code SchemaLocationOption} dependency.
379     * <p>This method returns the "{@code JOMC CLI Schema Location Option}" object of the {@code org.apache.commons.cli.Option} specification.</p>
380     * <p>That specification does not apply to any scope. A new object is returned whenever requested and bound to this instance.</p>
381     * @return The {@code SchemaLocationOption} dependency.
382     * @throws org.jomc.ObjectManagementException if getting the dependency instance fails.
383     */
384    @javax.annotation.Generated( value = "org.jomc.tools.JavaSources",
385                                 comments = "See http://jomc.sourceforge.net/jomc/1.0-alpha-16/jomc-tools" )
386    private org.apache.commons.cli.Option getSchemaLocationOption()
387    {
388        final org.apache.commons.cli.Option _d = (org.apache.commons.cli.Option) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "SchemaLocationOption" );
389        assert _d != null : "'SchemaLocationOption' dependency not found.";
390        return _d;
391    }
392 
393    /**
394     * Gets the {@code ServiceLocationOption} dependency.
395     * <p>This method returns the "{@code JOMC CLI Service Location Option}" object of the {@code org.apache.commons.cli.Option} specification.</p>
396     * <p>That specification does not apply to any scope. A new object is returned whenever requested and bound to this instance.</p>
397     * @return The {@code ServiceLocationOption} dependency.
398     * @throws org.jomc.ObjectManagementException if getting the dependency instance fails.
399     */
400    @javax.annotation.Generated( value = "org.jomc.tools.JavaSources",
401                                 comments = "See http://jomc.sourceforge.net/jomc/1.0-alpha-16/jomc-tools" )
402    private org.apache.commons.cli.Option getServiceLocationOption()
403    {
404        final org.apache.commons.cli.Option _d = (org.apache.commons.cli.Option) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "ServiceLocationOption" );
405        assert _d != null : "'ServiceLocationOption' dependency not found.";
406        return _d;
407    }
408 
409    /**
410     * Gets the {@code TransformerLocationOption} dependency.
411     * <p>This method returns the "{@code JOMC CLI Transformer Location Option}" object of the {@code org.apache.commons.cli.Option} specification.</p>
412     * <p>That specification does not apply to any scope. A new object is returned whenever requested and bound to this instance.</p>
413     * @return The {@code TransformerLocationOption} dependency.
414     * @throws org.jomc.ObjectManagementException if getting the dependency instance fails.
415     */
416    @javax.annotation.Generated( value = "org.jomc.tools.JavaSources",
417                                 comments = "See http://jomc.sourceforge.net/jomc/1.0-alpha-16/jomc-tools" )
418    private org.apache.commons.cli.Option getTransformerLocationOption()
419    {
420        final org.apache.commons.cli.Option _d = (org.apache.commons.cli.Option) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "TransformerLocationOption" );
421        assert _d != null : "'TransformerLocationOption' dependency not found.";
422        return _d;
423    }
424    // </editor-fold>
425    // SECTION-END
426    // SECTION-START[Properties]
427    // <editor-fold defaultstate="collapsed" desc=" Generated Properties ">
428 
429    /**
430     * Gets the value of the {@code abbreviatedCommandName} property.
431     * @return Abbreviated name of the command.
432     * @throws org.jomc.ObjectManagementException if getting the property instance fails.
433     */
434    @javax.annotation.Generated( value = "org.jomc.tools.JavaSources",
435                                 comments = "See http://jomc.sourceforge.net/jomc/1.0-alpha-16/jomc-tools" )
436    private java.lang.String getAbbreviatedCommandName()
437    {
438        final java.lang.String _p = (java.lang.String) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getProperty( this, "abbreviatedCommandName" );
439        assert _p != null : "'abbreviatedCommandName' property not found.";
440        return _p;
441    }
442 
443    /**
444     * Gets the value of the {@code commandName} property.
445     * @return Name of the command.
446     * @throws org.jomc.ObjectManagementException if getting the property instance fails.
447     */
448    @javax.annotation.Generated( value = "org.jomc.tools.JavaSources",
449                                 comments = "See http://jomc.sourceforge.net/jomc/1.0-alpha-16/jomc-tools" )
450    private java.lang.String getCommandName()
451    {
452        final java.lang.String _p = (java.lang.String) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getProperty( this, "commandName" );
453        assert _p != null : "'commandName' property not found.";
454        return _p;
455    }
456    // </editor-fold>
457    // SECTION-END
458    // SECTION-START[Messages]
459    // <editor-fold defaultstate="collapsed" desc=" Generated Messages ">
460 
461    /**
462     * Gets the text of the {@code applicationTitle} message.
463     * <p><b>Templates</b><br/><table>
464     * <tr><td valign="top">English:</td><td valign="top"><pre>JOMC Version 1.0-alpha-16 Build 2010-02-02T05:28:08+0000</pre></td></tr>
465     * </table></p>
466     * @param locale The locale of the message to return.
467     * @return The text of the {@code applicationTitle} message.
468     *
469     * @throws org.jomc.ObjectManagementException if getting the message instance fails.
470     */
471    @javax.annotation.Generated( value = "org.jomc.tools.JavaSources",
472                                 comments = "See http://jomc.sourceforge.net/jomc/1.0-alpha-16/jomc-tools" )
473    private String getApplicationTitleMessage( final java.util.Locale locale )
474    {
475        final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "applicationTitle", locale );
476        assert _m != null : "'applicationTitle' message not found.";
477        return _m;
478    }
479 
480    /**
481     * Gets the text of the {@code cannotProcess} message.
482     * <p><b>Templates</b><br/><table>
483     * <tr><td valign="top">English:</td><td valign="top"><pre>Cannot process ''{0}'': {1}</pre></td></tr>
484     * <tr><td valign="top">Deutsch:</td><td valign="top"><pre>Kann ''{0}'' nicht verarbeiten: {1}</pre></td></tr>
485     * </table></p>
486     * @param locale The locale of the message to return.
487     * @param itemInfo Format argument.
488     * @param detailMessage Format argument.
489     * @return The text of the {@code cannotProcess} message.
490     *
491     * @throws org.jomc.ObjectManagementException if getting the message instance fails.
492     */
493    @javax.annotation.Generated( value = "org.jomc.tools.JavaSources",
494                                 comments = "See http://jomc.sourceforge.net/jomc/1.0-alpha-16/jomc-tools" )
495    private String getCannotProcessMessage( final java.util.Locale locale, final java.lang.String itemInfo, final java.lang.String detailMessage )
496    {
497        final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "cannotProcess", locale, itemInfo, detailMessage );
498        assert _m != null : "'cannotProcess' message not found.";
499        return _m;
500    }
501 
502    /**
503     * Gets the text of the {@code classpathElement} message.
504     * <p><b>Templates</b><br/><table>
505     * <tr><td valign="top">English:</td><td valign="top"><pre>Classpath element: ''{0}''</pre></td></tr>
506     * <tr><td valign="top">Deutsch:</td><td valign="top"><pre>Klassenpfad-Element: ''{0}''</pre></td></tr>
507     * </table></p>
508     * @param locale The locale of the message to return.
509     * @param classpathElement Format argument.
510     * @return The text of the {@code classpathElement} message.
511     *
512     * @throws org.jomc.ObjectManagementException if getting the message instance fails.
513     */
514    @javax.annotation.Generated( value = "org.jomc.tools.JavaSources",
515                                 comments = "See http://jomc.sourceforge.net/jomc/1.0-alpha-16/jomc-tools" )
516    private String getClasspathElementMessage( final java.util.Locale locale, final java.lang.String classpathElement )
517    {
518        final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "classpathElement", locale, classpathElement );
519        assert _m != null : "'classpathElement' message not found.";
520        return _m;
521    }
522 
523    /**
524     * Gets the text of the {@code defaultLogLevelInfo} message.
525     * <p><b>Templates</b><br/><table>
526     * <tr><td valign="top">English:</td><td valign="top"><pre>Default log level: ''{0}''</pre></td></tr>
527     * <tr><td valign="top">Deutsch:</td><td valign="top"><pre>Standard-Protokollierungsstufe: ''{0}''</pre></td></tr>
528     * </table></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.
532     *
533     * @throws org.jomc.ObjectManagementException if getting the message instance fails.
534     */
535    @javax.annotation.Generated( value = "org.jomc.tools.JavaSources",
536                                 comments = "See http://jomc.sourceforge.net/jomc/1.0-alpha-16/jomc-tools" )
537    private String getDefaultLogLevelInfoMessage( final java.util.Locale locale, final java.lang.String defaultLogLevel )
538    {
539        final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "defaultLogLevelInfo", locale, defaultLogLevel );
540        assert _m != null : "'defaultLogLevelInfo' message not found.";
541        return _m;
542    }
543 
544    /**
545     * Gets the text of the {@code documentFile} message.
546     * <p><b>Templates</b><br/><table>
547     * <tr><td valign="top">English:</td><td valign="top"><pre>Document file: ''{0}''</pre></td></tr>
548     * <tr><td valign="top">Deutsch:</td><td valign="top"><pre>Dokument-Datei: ''{0}''</pre></td></tr>
549     * </table></p>
550     * @param locale The locale of the message to return.
551     * @param documentFile Format argument.
552     * @return The text of the {@code documentFile} message.
553     *
554     * @throws org.jomc.ObjectManagementException if getting the message instance fails.
555     */
556    @javax.annotation.Generated( value = "org.jomc.tools.JavaSources",
557                                 comments = "See http://jomc.sourceforge.net/jomc/1.0-alpha-16/jomc-tools" )
558    private String getDocumentFileMessage( final java.util.Locale locale, final java.lang.String documentFile )
559    {
560        final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "documentFile", locale, documentFile );
561        assert _m != null : "'documentFile' message not found.";
562        return _m;
563    }
564 
565    /**
566     * Gets the text of the {@code invalidModel} message.
567     * <p><b>Templates</b><br/><table>
568     * <tr><td valign="top">English:</td><td valign="top"><pre>Invalid model.</pre></td></tr>
569     * <tr><td valign="top">Deutsch:</td><td valign="top"><pre>Ung&uuml;ltiges Modell.</pre></td></tr>
570     * </table></p>
571     * @param locale The locale of the message to return.
572     * @return The text of the {@code invalidModel} message.
573     *
574     * @throws org.jomc.ObjectManagementException if getting the message instance fails.
575     */
576    @javax.annotation.Generated( value = "org.jomc.tools.JavaSources",
577                                 comments = "See http://jomc.sourceforge.net/jomc/1.0-alpha-16/jomc-tools" )
578    private String getInvalidModelMessage( final java.util.Locale locale )
579    {
580        final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "invalidModel", locale );
581        assert _m != null : "'invalidModel' message not found.";
582        return _m;
583    }
584 
585    /**
586     * Gets the text of the {@code longDescription} message.
587     * <p><b>Templates</b><br/><table>
588     * <tr><td valign="top">English:</td><td valign="top"><pre>Example:
589     *   jomc validate-java-classes -cp target/classes \
590     *                              -df examples/xml/jomc-cli.xml \
591     *                              -v</pre></td></tr>
592     * <tr><td valign="top">Deutsch:</td><td valign="top"><pre>Beispiel:
593     *   jomc validate-java-classes -cp target/classes \
594     *                              -df examples/xml/jomc-cli.xml \
595     *                              -v</pre></td></tr>
596     * </table></p>
597     * @param locale The locale of the message to return.
598     * @return The text of the {@code longDescription} message.
599     *
600     * @throws org.jomc.ObjectManagementException if getting the message instance fails.
601     */
602    @javax.annotation.Generated( value = "org.jomc.tools.JavaSources",
603                                 comments = "See http://jomc.sourceforge.net/jomc/1.0-alpha-16/jomc-tools" )
604    private String getLongDescriptionMessage( final java.util.Locale locale )
605    {
606        final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "longDescription", locale );
607        assert _m != null : "'longDescription' message not found.";
608        return _m;
609    }
610 
611    /**
612     * Gets the text of the {@code missingModule} message.
613     * <p><b>Templates</b><br/><table>
614     * <tr><td valign="top">English:</td><td valign="top"><pre>Module ''{0}'' not found.</pre></td></tr>
615     * <tr><td valign="top">Deutsch:</td><td valign="top"><pre>Modul ''{0}'' nicht gefunden.</pre></td></tr>
616     * </table></p>
617     * @param locale The locale of the message to return.
618     * @param moduleName Format argument.
619     * @return The text of the {@code missingModule} message.
620     *
621     * @throws org.jomc.ObjectManagementException if getting the message instance fails.
622     */
623    @javax.annotation.Generated( value = "org.jomc.tools.JavaSources",
624                                 comments = "See http://jomc.sourceforge.net/jomc/1.0-alpha-16/jomc-tools" )
625    private String getMissingModuleMessage( final java.util.Locale locale, final java.lang.String moduleName )
626    {
627        final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "missingModule", locale, moduleName );
628        assert _m != null : "'missingModule' message not found.";
629        return _m;
630    }
631 
632    /**
633     * Gets the text of the {@code modulesReport} message.
634     * <p><b>Templates</b><br/><table>
635     * <tr><td valign="top">English:</td><td valign="top"><pre>Modules</pre></td></tr>
636     * <tr><td valign="top">Deutsch:</td><td valign="top"><pre>Module</pre></td></tr>
637     * </table></p>
638     * @param locale The locale of the message to return.
639     * @return The text of the {@code modulesReport} message.
640     *
641     * @throws org.jomc.ObjectManagementException if getting the message instance fails.
642     */
643    @javax.annotation.Generated( value = "org.jomc.tools.JavaSources",
644                                 comments = "See http://jomc.sourceforge.net/jomc/1.0-alpha-16/jomc-tools" )
645    private String getModulesReportMessage( final java.util.Locale locale )
646    {
647        final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "modulesReport", locale );
648        assert _m != null : "'modulesReport' message not found.";
649        return _m;
650    }
651 
652    /**
653     * Gets the text of the {@code separator} message.
654     * <p><b>Templates</b><br/><table>
655     * <tr><td valign="top">English:</td><td valign="top"><pre>--------------------------------------------------------------------------------</pre></td></tr>
656     * </table></p>
657     * @param locale The locale of the message to return.
658     * @return The text of the {@code separator} message.
659     *
660     * @throws org.jomc.ObjectManagementException if getting the message instance fails.
661     */
662    @javax.annotation.Generated( value = "org.jomc.tools.JavaSources",
663                                 comments = "See http://jomc.sourceforge.net/jomc/1.0-alpha-16/jomc-tools" )
664    private String getSeparatorMessage( final java.util.Locale locale )
665    {
666        final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "separator", locale );
667        assert _m != null : "'separator' message not found.";
668        return _m;
669    }
670 
671    /**
672     * Gets the text of the {@code shortDescription} message.
673     * <p><b>Templates</b><br/><table>
674     * <tr><td valign="top">English:</td><td valign="top"><pre>Validates Java class files.</pre></td></tr>
675     * <tr><td valign="top">Deutsch:</td><td valign="top"><pre>Pr&uuml;ft Java Klassendateien.</pre></td></tr>
676     * </table></p>
677     * @param locale The locale of the message to return.
678     * @return The text of the {@code shortDescription} message.
679     *
680     * @throws org.jomc.ObjectManagementException if getting the message instance fails.
681     */
682    @javax.annotation.Generated( value = "org.jomc.tools.JavaSources",
683                                 comments = "See http://jomc.sourceforge.net/jomc/1.0-alpha-16/jomc-tools" )
684    private String getShortDescriptionMessage( final java.util.Locale locale )
685    {
686        final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "shortDescription", locale );
687        assert _m != null : "'shortDescription' message not found.";
688        return _m;
689    }
690 
691    /**
692     * Gets the text of the {@code startingModuleProcessing} message.
693     * <p><b>Templates</b><br/><table>
694     * <tr><td valign="top">English:</td><td valign="top"><pre>Executing command {0} with module ''{1}'' ...</pre></td></tr>
695     * <tr><td valign="top">Deutsch:</td><td valign="top"><pre>F&uuml;hrt Befehl {0} mit Modul ''{1}'' aus ... </pre></td></tr>
696     * </table></p>
697     * @param locale The locale of the message to return.
698     * @param toolName Format argument.
699     * @param moduleName Format argument.
700     * @return The text of the {@code startingModuleProcessing} message.
701     *
702     * @throws org.jomc.ObjectManagementException if getting the message instance fails.
703     */
704    @javax.annotation.Generated( value = "org.jomc.tools.JavaSources",
705                                 comments = "See http://jomc.sourceforge.net/jomc/1.0-alpha-16/jomc-tools" )
706    private String getStartingModuleProcessingMessage( final java.util.Locale locale, final java.lang.String toolName, final java.lang.String moduleName )
707    {
708        final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "startingModuleProcessing", locale, toolName, moduleName );
709        assert _m != null : "'startingModuleProcessing' message not found.";
710        return _m;
711    }
712 
713    /**
714     * Gets the text of the {@code startingProcessing} message.
715     * <p><b>Templates</b><br/><table>
716     * <tr><td valign="top">English:</td><td valign="top"><pre>Executing command {0} ...</pre></td></tr>
717     * <tr><td valign="top">Deutsch:</td><td valign="top"><pre>F&uuml;hrt Befehl {0} aus ... </pre></td></tr>
718     * </table></p>
719     * @param locale The locale of the message to return.
720     * @param toolName Format argument.
721     * @return The text of the {@code startingProcessing} message.
722     *
723     * @throws org.jomc.ObjectManagementException if getting the message instance fails.
724     */
725    @javax.annotation.Generated( value = "org.jomc.tools.JavaSources",
726                                 comments = "See http://jomc.sourceforge.net/jomc/1.0-alpha-16/jomc-tools" )
727    private String getStartingProcessingMessage( final java.util.Locale locale, final java.lang.String toolName )
728    {
729        final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "startingProcessing", locale, toolName );
730        assert _m != null : "'startingProcessing' message not found.";
731        return _m;
732    }
733 
734    /**
735     * Gets the text of the {@code toolFailure} message.
736     * <p><b>Templates</b><br/><table>
737     * <tr><td valign="top">English:</td><td valign="top"><pre>{0} failure.</pre></td></tr>
738     * <tr><td valign="top">Deutsch:</td><td valign="top"><pre>{0} fehlgeschlagen.</pre></td></tr>
739     * </table></p>
740     * @param locale The locale of the message to return.
741     * @param toolName Format argument.
742     * @return The text of the {@code toolFailure} message.
743     *
744     * @throws org.jomc.ObjectManagementException if getting the message instance fails.
745     */
746    @javax.annotation.Generated( value = "org.jomc.tools.JavaSources",
747                                 comments = "See http://jomc.sourceforge.net/jomc/1.0-alpha-16/jomc-tools" )
748    private String getToolFailureMessage( final java.util.Locale locale, final java.lang.String toolName )
749    {
750        final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "toolFailure", locale, toolName );
751        assert _m != null : "'toolFailure' message not found.";
752        return _m;
753    }
754 
755    /**
756     * Gets the text of the {@code toolSuccess} message.
757     * <p><b>Templates</b><br/><table>
758     * <tr><td valign="top">English:</td><td valign="top"><pre>{0} successful.</pre></td></tr>
759     * <tr><td valign="top">Deutsch:</td><td valign="top"><pre>{0} erfolgreich.</pre></td></tr>
760     * </table></p>
761     * @param locale The locale of the message to return.
762     * @param toolName Format argument.
763     * @return The text of the {@code toolSuccess} message.
764     *
765     * @throws org.jomc.ObjectManagementException if getting the message instance fails.
766     */
767    @javax.annotation.Generated( value = "org.jomc.tools.JavaSources",
768                                 comments = "See http://jomc.sourceforge.net/jomc/1.0-alpha-16/jomc-tools" )
769    private String getToolSuccessMessage( final java.util.Locale locale, final java.lang.String toolName )
770    {
771        final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "toolSuccess", locale, toolName );
772        assert _m != null : "'toolSuccess' message not found.";
773        return _m;
774    }
775    // </editor-fold>
776    // SECTION-END
777}

[all classes][org.jomc.cli.commands]
EMMA 2.0.5312 (C) Vladimir Roubtsov