1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
package org.mule.config.i18n; |
11 | |
|
12 | |
import org.mule.util.StringUtils; |
13 | |
|
14 | |
import java.lang.annotation.Annotation; |
15 | |
import java.lang.reflect.Method; |
16 | |
|
17 | |
|
18 | |
|
19 | |
|
20 | 0 | public class AnnotationsMessages extends MessageFactory |
21 | |
{ |
22 | 0 | private static final String BUNDLE_PATH = getBundlePath("annotations"); |
23 | |
|
24 | 0 | private static final AnnotationsMessages factory = new AnnotationsMessages(); |
25 | |
|
26 | |
public static Message serviceDoesNotHaveAnnotation(Class serviceClass, String annotationName) |
27 | |
{ |
28 | 0 | return factory.createMessage(BUNDLE_PATH, 1, serviceClass.getName(), annotationName); |
29 | |
} |
30 | |
|
31 | |
public static Message serviceHasNoEntrypoint(Class serviceClass) |
32 | |
{ |
33 | 0 | return factory.createMessage(BUNDLE_PATH, 2, serviceClass.getName()); |
34 | |
} |
35 | |
|
36 | |
public static Message noParserFoundForAnnotation(Annotation annotation) |
37 | |
{ |
38 | 0 | return factory.createMessage(BUNDLE_PATH, 3, annotation); |
39 | |
} |
40 | |
|
41 | |
public static Message noPropertyConverterForType(Class type) |
42 | |
{ |
43 | 0 | return factory.createMessage(BUNDLE_PATH, 4, type); |
44 | |
} |
45 | |
|
46 | |
public static Message failedToInvokeReplyMethod(String method) |
47 | |
{ |
48 | 0 | return factory.createMessage(BUNDLE_PATH, 5, method); |
49 | |
} |
50 | |
|
51 | |
public static Message transformerMethodNotValid(Method method) |
52 | |
{ |
53 | 0 | return factory.createMessage(BUNDLE_PATH, 6, method); |
54 | |
} |
55 | |
|
56 | |
public static Message lookupNotFoundInRegistry(Class type, String name, Class object) |
57 | |
{ |
58 | 0 | return factory.createMessage(BUNDLE_PATH, 7, type, (StringUtils.isBlank(name) ? "[no name]" : name), object); |
59 | |
} |
60 | |
|
61 | |
public static Message lookupFailedSeePreviousException(Object object) |
62 | |
{ |
63 | 0 | return factory.createMessage(BUNDLE_PATH, 8, object); |
64 | |
} |
65 | |
} |
66 | |
|