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