void link(Linker linker) { linker = linker.withContext(this); for (Rpc rpc : rpcs) { rpc.link(linker); } }
void validate(Linker linker) { linker = linker.withContext(this); for (Rpc rpc : rpcs) { rpc.validate(linker); } }
@Override void validate(Linker linker) { linker = linker.withContext(this); if (!"true".equals(allowAlias)) { validateTagUniqueness(linker); } }
void link(Linker linker) { linker = linker.withContext(this); type = linker.resolveType(elementType); }
void linkOptions(Linker linker) { linker = linker.withContext(this); options.link(linker); }
void link(Linker linker) { linker = linker.withContext(this); requestType = linker.resolveMessageType(requestTypeElement); responseType = linker.resolveMessageType(responseTypeElement); }
void linkOptions(Linker linker) { linker = linker.withContext(this); for (Rpc rpc : rpcs) { rpc.linkOptions(linker); } options.link(linker); }
void validate(Linker linker) { linker = linker.withContext(this); linker.validateImport(location(), type()); } }
void link(Linker linker) { linker = linker.withContext(this); protoType = linker.resolveMessageType(name); Type type = linker.get(protoType); if (type != null) { ((MessageType) type).addExtensionFields(fields); } }
void validate(Linker linker) { linker = linker.withContext(this); linker.validateImport(location(), requestType); linker.validateImport(location(), responseType); }
int tag = field.tag(); if (!Util.isValidTag(tag)) { withContext(field).addError("tag is out of range: %s", tag); withContext(field).addError("tag %s is reserved (%s)", tag, reserved.location()); withContext(field).addError("name '%s' is reserved (%s)", field.name(), reserved.location());
void link(Linker linker) { linker = linker.withContext(this); for (Field field : declaredFields) { field.link(linker); } for (Field field : extensionFields) { field.link(linker); } for (OneOf oneOf : oneOfs) { oneOf.link(linker); } for (Type type : nestedTypes) { type.link(linker); } }
void linkOptions(Linker linker) { linker = linker.withContext(this); for (Type type : nestedTypes) { type.linkOptions(linker); } for (Field field : declaredFields) { field.linkOptions(linker); } for (Field field : extensionFields) { field.linkOptions(linker); } for (OneOf oneOf : oneOfs) { oneOf.linkOptions(linker); } options.link(linker); }
void validate(Linker linker) { if (!Util.isValidTag(start()) || !Util.isValidTag(end())) { linker.withContext(this).addError("tags are out of range: %s to %s", start(), end()); } } }
void linkOptions(Linker linker) { linker = linker.withContext(this); options.link(linker); deprecated = options().get(DEPRECATED); packed = options().get(PACKED); // We allow any package name to be used as long as it ends with '.redacted'. redacted = options().optionMatches(".*\\.redacted", "true"); }
void validate(Linker linker) { linker = linker.withContext(this); if (isPacked() && !isPackable(linker, type)) { linker.addError("packed=true not permitted on %s", type); } if (extension && isRequired()) { linker.addError("extension fields cannot be required", type); } linker.validateImport(location(), type); }
void validate(Linker linker) { linker = linker.withContext(this); linker.validateFields(fieldsAndOneOfFields(), reserveds); linker.validateEnumConstantNameUniqueness(nestedTypes); for (Field field : fieldsAndOneOfFields()) { field.validate(linker); } for (Type type : nestedTypes) { type.validate(linker); } for (Extensions extensions : extensionsList) { extensions.validate(linker); } }
Linker linker = withContext(protoFile); for (Extend extend : protoFile.extendList()) { extend.link(linker); Linker linker = withContext(protoFile); for (Type type : protoFile.types()) { type.link(linker); Linker linker = withContext(protoFile); protoFile.linkOptions(linker); for (Type type : protoFile.types()) { Linker linker = withContext(protoFile); for (Type type : protoFile.types()) { type.validate(linker);
void validate(Linker linker) { linker = linker.withContext(this); linker.validateImport(location(), type()); } }
void validate(Linker linker) { linker = linker.withContext(this); linker.validateImport(location(), requestType); linker.validateImport(location(), responseType); }