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.515+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/PropertyOverwriteConstraintExceptionBundle"</code>
16 * <code>ResourceBundle</code>.
17 */
18 class PropertyOverwriteConstraintExceptionBundle
19 {
20
21 /** Singleton instance. */
22 private static final PropertyOverwriteConstraintExceptionBundle instance =
23 new PropertyOverwriteConstraintExceptionBundle();
24
25 /** Creates a new <code>PropertyOverwriteConstraintExceptionBundle</code> instance. */
26 PropertyOverwriteConstraintExceptionBundle()
27 {
28 this.getMessage ( "propertyOverwriteConstraint", Locale.getDefault() );
29 this.getMessage ( "propertyNotImplemented", Locale.getDefault() );
30 }
31
32 /**
33 * Gets the <code>PropertyOverwriteConstraintExceptionBundle</code> singleton.
34 *
35 * @return The <code>PropertyOverwriteConstraintExceptionBundle</code> singleton.
36 */
37 static PropertyOverwriteConstraintExceptionBundle getInstance()
38 {
39 return instance;
40 }
41
42 /**
43 * Gets the text of the message with key {@code "propertyOverwriteConstraint"}.
44 *
45 * @return <blockquote><pre>Dependency "{1}" for implementation "{0}" violates model constraints.</pre></blockquote>
46 * <blockquote><pre>Abhängigkeit "{1}" der Implementierung "{0}" verletzt Modell-Auflagen.</pre></blockquote>
47 *
48 */
49 String getPropertyOverwriteConstraintMessage
50 (
51 Locale locale
52 , final java.lang.String implementationIdentifier
53 , final java.lang.String dependencyName
54 )
55 {
56 if ( locale == null )
57 {
58 locale = Locale.getDefault();
59 }
60
61 return new MessageFormat( this.getMessage(
62 "propertyOverwriteConstraint", locale ), locale ).format(
63 new Object[]
64 {
65 implementationIdentifier,
66 dependencyName,
67 null
68 } );
69
70 }
71 /**
72 * Gets the text of the message with key {@code "propertyNotImplemented"}.
73 *
74 * @return <blockquote><pre>Implementation "{0}" does not implement property "{2}" specified by "{1}".</pre></blockquote>
75 * <blockquote><pre>Implementierung "{0}" implementiert die "{2}" Eigenschaft der Spezifikation "{1}" nicht.</pre></blockquote>
76 *
77 */
78 String getPropertyNotImplementedMessage
79 (
80 Locale locale
81 , final java.lang.String implementationIdentifier
82 , final java.lang.String specificationIdentifier
83 , final java.lang.String propertyName
84 )
85 {
86 if ( locale == null )
87 {
88 locale = Locale.getDefault();
89 }
90
91 return new MessageFormat( this.getMessage(
92 "propertyNotImplemented", locale ), locale ).format(
93 new Object[]
94 {
95 implementationIdentifier,
96 specificationIdentifier,
97 propertyName,
98 null
99 } );
100
101 }
102
103 /**
104 * Gets a message for a given key and locale.
105 *
106 * @param key The key of the message to return.
107 * @param locale The locale of the message.
108 *
109 * @return Message for {@code key} using {@code locale}.
110 */
111 private String getMessage( final String key, Locale locale )
112 {
113 if ( locale == null )
114 {
115 locale = Locale.getDefault();
116 }
117
118 return ResourceBundle.getBundle(
119 "org/jdtaus/core/container/PropertyOverwriteConstraintExceptionBundle", locale ).
120 getString( key );
121
122 }
123 }