code: public boolean isNlsBundleMethod(Method method, boolean ignoreIllegalMethods) {
  
      Class<?> declaringClass = method.getDeclaringClass();
      assert (declaringClass.isInterface());
      if (NlsMessage.class.equals(method.getReturnType())) {
        assert (NlsBundle.class.isAssignableFrom(declaringClass));
        return true;
      } else if (!declaringClass.isAssignableFrom(NlsBundle.class)) {
        if (!ignoreIllegalMethods) {
          throw new IllegalArgumentException(declaringClass.getName() + "." + method.getName());
        }
      }
      return false;
    }
docs: This method determines if the given {@link Method} is a regular {@link NlsBundle}-method.
  
  @param method the {@link Method} to check.
  @param ignoreIllegalMethods - {@code true} if illegal methods (non NlsBundleMethods other than those defined by
  {@link Object}) should be ignored, {@code false} if they should cause an exception.
  @return {@code true} if the given {@link Method} is a legal {@link NlsBundle} method, {@code false} otherwise (e.g.
  for {@code toString()}).