code: public static boolean isMethodVisibleInJS(ExecutableElement method) {
      return (hasAnnotation(method.getEnclosingElement(), JsType.class) && method
          .getModifiers()
          .contains(Modifier.PUBLIC)) || hasAnnotation(method, JsMethod.class);
    }
docs: Return weather a given method is visible in JS (JsInterop). It will be the case if it's public
  and it's class/interface has the {@link JsType} annotation, or if it has the {@link JsMethod}
  annotation.
  
  @param method The method to check
  @return true if it is visible (JsInterop), false otherwise