@Override public String getFullName() { return protoField.getFullName(); }
@Override public String toString() { return String.format("%s %s", getType(), getFullName()); } }
@Override public String toString() { return String.format("%s %s", getType(), getFullName()); } }
ResolvedLocation.create(method.getLocation()), "map field '%s' referred to by message '%s' cannot be mapped as an HTTP parameter.", field.getFullName(), getInputMessageName(method)); return; "cyclic message field '%s' referred to by message '%s' in method '%s' cannot be mapped " + "as an HTTP parameter.", field.getFullName(), getInputMessageName(method), method); if (ALLOWED_REPEATED_FIELDS_IN_QUERY_PARAM.contains(field.getFullName())) { return; "repeated message field '%s' referred to by message '%s' cannot be mapped " + "as an HTTP parameter.", field.getFullName(), getInputMessageName(method));
ResolvedLocation.create(method.getLocation()), "map field '%s' referred to by message '%s' cannot be mapped as an HTTP parameter.", field.getFullName(), getInputMessageName(method)); return; "cyclic message field '%s' referred to by message '%s' in method '%s' cannot be mapped " + "as an HTTP parameter.", field.getFullName(), getInputMessageName(method), method); if (ALLOWED_REPEATED_FIELDS_IN_QUERY_PARAM.contains(field.getFullName())) { return; "repeated message field '%s' referred to by message '%s' cannot be mapped " + "as an HTTP parameter.", field.getFullName(), getInputMessageName(method));
@Visits void reach(Method method) { mustBeInScope(method, method.getInputMessage()); mustBeInScope(method, method.getOutputMessage()); markAsReachable(method); // Check whether any HTTP bounded fields are visible. HttpAttribute http = method.getAttribute(HttpAttribute.KEY); if (http != null) { for (HttpAttribute binding : http.getAllBindings()) { Iterable<FieldSelector> selectors = binding.getPathSelectors(); if (!binding.bodyCapturesUnboundFields()) { // Only add body fields if '*' is not used, otherwise they aren't required. selectors = Iterables.concat(selectors, binding.getBodySelectors()); } for (FieldSelector selector : selectors) { for (Field field : selector.getFields()) { if (!isReachable(field)) { errorSince( 2, field, "Field '%s' required by HTTP binding of method '%s' cannot be hidden. %s.", field.getFullName(), method.getFullName(), reasonForUnreachable(field)); } } } } } }
@Visits void reach(Method method) { mustBeInScope(method, method.getInputMessage()); mustBeInScope(method, method.getOutputMessage()); markAsReachable(method); // Check whether any HTTP bounded fields are visible. HttpAttribute http = method.getAttribute(HttpAttribute.KEY); if (http != null) { for (HttpAttribute binding : http.getAllBindings()) { Iterable<FieldSelector> selectors = binding.getPathSelectors(); if (!binding.bodyCapturesUnboundFields()) { // Only add body fields if '*' is not used, otherwise they aren't required. selectors = Iterables.concat(selectors, binding.getBodySelectors()); } for (FieldSelector selector : selectors) { for (Field field : selector.getFields()) { if (!isReachable(field)) { errorSince( 2, field, "Field '%s' required by HTTP binding of method '%s' cannot be hidden. %s.", field.getFullName(), method.getFullName(), reasonForUnreachable(field)); } } } } } }