1 /*
2 * WARNING: Generated code. All changes will be lost upon re-generation.
3 *
4 * Generator org.jdtaus.mojo.resource.util.BundleGenerator 3.3
5 * Template META-INF/templates/Bundle.java.vm
6 * Generated 2012-12-03T20:50:43.203+0100
7 */
8 package org.jdtaus.core.container;
9
10 import java.util.Locale;
11 import java.util.ResourceBundle;
12 import java.text.MessageFormat;
13
14 /**
15 * Accessor methods for the <code>"org/jdtaus/core/container/IncompatibleImplementationExceptionBundle"</code>
16 * <code>ResourceBundle</code>.
17 */
18 class IncompatibleImplementationExceptionBundle
19 {
20
21 /** Singleton instance. */
22 private static final IncompatibleImplementationExceptionBundle instance =
23 new IncompatibleImplementationExceptionBundle();
24
25 /** Creates a new <code>IncompatibleImplementationExceptionBundle</code> instance. */
26 IncompatibleImplementationExceptionBundle()
27 {
28 this.getMessage ( "incompatibleImplementation", Locale.getDefault() );
29 }
30
31 /**
32 * Gets the <code>IncompatibleImplementationExceptionBundle</code> singleton.
33 *
34 * @return The <code>IncompatibleImplementationExceptionBundle</code> singleton.
35 */
36 static IncompatibleImplementationExceptionBundle getInstance()
37 {
38 return instance;
39 }
40
41 /**
42 * Gets the text of the message with key {@code "incompatibleImplementation"}.
43 *
44 * @return <blockquote><pre>{0,choice,0#Implementation "{3}" implements version "{4}" of specification "{1}". Required implementation level is "{2}".|1#Implementation "{3}" depends on version "{5}" of specification "{1}". Available specification level is "{2}".}</pre></blockquote>
45 * <blockquote><pre>{0,choice,0#Implementierung "{3}" implementiert Version "{4}" der Spezifikation "{1}". Benötigte Implementierungsstufe ist "{2}".|1#Implementierung "{3}" hängt von Version "{5}" der Spezifikation "{1}" ab. Verfügbare Spezifikationsstufe ist "{2}".}</pre></blockquote>
46 *
47 */
48 String getIncompatibleImplementationMessage
49 (
50 Locale locale
51 , final java.lang.Number incompatibilityType
52 , final java.lang.String specificationIdentifier
53 , final java.lang.String requiredImplementationLevel
54 , final java.lang.String implementationIdentifier
55 , final java.lang.String implementedVersion
56 , final java.lang.String requiredVersion
57 )
58 {
59 if ( locale == null )
60 {
61 locale = Locale.getDefault();
62 }
63
64 return new MessageFormat( this.getMessage(
65 "incompatibleImplementation", locale ), locale ).format(
66 new Object[]
67 {
68 incompatibilityType,
69 specificationIdentifier,
70 requiredImplementationLevel,
71 implementationIdentifier,
72 implementedVersion,
73 requiredVersion,
74 null
75 } );
76
77 }
78
79 /**
80 * Gets a message for a given key and locale.
81 *
82 * @param key The key of the message to return.
83 * @param locale The locale of the message.
84 *
85 * @return Message for {@code key} using {@code locale}.
86 */
87 private String getMessage( final String key, Locale locale )
88 {
89 if ( locale == null )
90 {
91 locale = Locale.getDefault();
92 }
93
94 return ResourceBundle.getBundle(
95 "org/jdtaus/core/container/IncompatibleImplementationExceptionBundle", locale ).
96 getString( key );
97
98 }
99 }