1 15 package org.apache.hivemind.annotations; 16 17 import java.lang.reflect.Method ; 18 import java.lang.reflect.Modifier ; 19 20 import org.apache.hivemind.ClassResolver; 21 import org.apache.hivemind.impl.MessageFormatter; 22 import org.apache.hivemind.service.MethodSignature; 23 24 25 30 public class AnnotationsMessages 31 { 32 private static final MessageFormatter _formatter = new MessageFormatter(AnnotationsMessages.class, 33 "AnnotationsStrings"); 34 35 static String unableToFindModuleClass(String moduleClassName, ClassResolver resolver) 36 { 37 return _formatter.format("unable-to-find-module-class", resolver, moduleClassName); 38 } 39 40 public static String moduleClassHasInvalidModifiers(Class moduleClass, int invalidModifiers) 41 { 42 String modifierStr = Modifier.toString(invalidModifiers); 43 return _formatter.format("module-class-has-invalid-modifiers", moduleClass.getName(), modifierStr); 44 } 45 46 public static String moduleClassIsPackagePrivate(Class moduleClass) 47 { 48 return _formatter.format("module-class-is-package-private", moduleClass.getName()); 49 } 50 51 public static String annotatedMethodHasInvalidModifiers(Method method, String methodType, int invalidModifiers) 52 { 53 MethodSignature methodSig = new MethodSignature(method); 54 String modifierStr = Modifier.toString(invalidModifiers); 55 return _formatter.format("annotated-method-has-invalid-modifiers", methodSig.toString(), methodType, modifierStr); 56 } 57 58 public static String annotatedMethodIsProtectedAndNotAccessible(Method method, String methodType) 59 { 60 MethodSignature methodSig = new MethodSignature(method); 61 return _formatter.format("annotated-method-protected-not-accessible", methodSig.toString()); 62 } 63 64 } | Popular Tags |