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