throw new DescriptorValidationException(relativeTo, '\"' + name + "\" is not defined."); } else {
DescriptorPool.SearchFilter.TYPES_ONLY); if (!(extendee instanceof Descriptor)) { throw new DescriptorValidationException(this, '\"' + proto.getExtendee() + "\" is not a message type."); throw new DescriptorValidationException(this, '\"' + getContainingType().getFullName() + "\" does not declare " + getNumber() + type = Type.ENUM; } else { throw new DescriptorValidationException(this, '\"' + proto.getTypeName() + "\" is not a type."); throw new DescriptorValidationException(this, '\"' + proto.getTypeName() + "\" is not a message type."); throw new DescriptorValidationException(this, "Messages can't have default values."); throw new DescriptorValidationException(this, '\"' + proto.getTypeName() + "\" is not an enum type."); throw new DescriptorValidationException(this, "Field with primitive type has type_name."); if (getJavaType() == JavaType.MESSAGE || getJavaType() == JavaType.ENUM) { throw new DescriptorValidationException(this,
DescriptorPool.SearchFilter.TYPES_ONLY); if (!(extendee instanceof Descriptor)) { throw new DescriptorValidationException(this, '\"' + proto.getExtendee() + "\" is not a message type."); throw new DescriptorValidationException(this, '\"' + getContainingType().getFullName() + "\" does not declare " + getNumber() + type = Type.ENUM; } else { throw new DescriptorValidationException(this, '\"' + proto.getTypeName() + "\" is not a type."); throw new DescriptorValidationException(this, '\"' + proto.getTypeName() + "\" is not a message type."); throw new DescriptorValidationException(this, "Messages can't have default values."); throw new DescriptorValidationException(this, '\"' + proto.getTypeName() + "\" is not an enum type."); throw new DescriptorValidationException(this, "Field with primitive type has type_name."); if (getJavaType() == JavaType.MESSAGE || getJavaType() == JavaType.ENUM) { throw new DescriptorValidationException(this,
DescriptorPool.SearchFilter.TYPES_ONLY); if (!(extendee instanceof Descriptor)) { throw new DescriptorValidationException(this, '\"' + proto.getExtendee() + "\" is not a message type."); throw new DescriptorValidationException(this, '\"' + getContainingType().getFullName() + "\" does not declare " + getNumber() + type = Type.ENUM; } else { throw new DescriptorValidationException(this, '\"' + proto.getTypeName() + "\" is not a type."); throw new DescriptorValidationException(this, '\"' + proto.getTypeName() + "\" is not a message type."); throw new DescriptorValidationException(this, "Messages can't have default values."); throw new DescriptorValidationException(this, '\"' + proto.getTypeName() + "\" is not an enum type."); throw new DescriptorValidationException(this, "Field with primitive type has type_name."); if (getJavaType() == JavaType.MESSAGE || getJavaType() == JavaType.ENUM) { throw new DescriptorValidationException(this,
throw new DescriptorValidationException(relativeTo, '\"' + name + "\" is not defined."); } else {
throw new DescriptorValidationException(relativeTo, '\"' + name + "\" is not defined."); } else {
throw new DescriptorValidationException(this, "Field numbers must be positive integers."); throw new DescriptorValidationException(this, "[packed = true] can only be specified for repeated primitive " + "fields."); throw new DescriptorValidationException(this, "FieldDescriptorProto.extendee not set for extension field."); throw new DescriptorValidationException(this, "FieldDescriptorProto.extendee set for non-extension field.");
throw new DescriptorValidationException(this, "Field numbers must be positive integers."); throw new DescriptorValidationException(this, "[packed = true] can only be specified for repeated primitive " + "fields."); throw new DescriptorValidationException(this, "FieldDescriptorProto.extendee not set for extension field."); throw new DescriptorValidationException(this, "FieldDescriptorProto.extendee set for non-extension field.");
throw new DescriptorValidationException(result, "Dependencies passed to FileDescriptor.buildFrom() don't match " + "those listed in the FileDescriptorProto."); throw new DescriptorValidationException(result, "Dependencies passed to FileDescriptor.buildFrom() don't match " + "those listed in the FileDescriptorProto.");
throw new DescriptorValidationException(result, "Dependencies passed to FileDescriptor.buildFrom() don't match " + "those listed in the FileDescriptorProto."); throw new DescriptorValidationException(result, "Dependencies passed to FileDescriptor.buildFrom() don't match " + "those listed in the FileDescriptorProto.");
int index = proto.getPublicDependency(i); if (index < 0 || index >= this.dependencies.length) { throw new DescriptorValidationException(this, "Invalid public dependency index.");
throw new DescriptorValidationException(this, "Field numbers must be positive integers."); throw new DescriptorValidationException(this, "[packed = true] can only be specified for repeated primitive " + "fields."); throw new DescriptorValidationException(this, "FieldDescriptorProto.extendee not set for extension field."); throw new DescriptorValidationException(this, "FieldDescriptorProto.extendee set for non-extension field.");
throw new DescriptorValidationException(result, "Dependencies passed to FileDescriptor.buildFrom() don't match " + "those listed in the FileDescriptorProto."); throw new DescriptorValidationException(result, "Dependencies passed to FileDescriptor.buildFrom() don't match " + "those listed in the FileDescriptorProto.");
final String name = descriptor.getName(); if (name.length() == 0) { throw new DescriptorValidationException(descriptor, "Missing name."); } else { boolean valid = true; throw new DescriptorValidationException(descriptor, '\"' + name + "\" is not a valid identifier.");
int index = proto.getPublicDependency(i); if (index < 0 || index >= this.dependencies.length) { throw new DescriptorValidationException(this, "Invalid public dependency index.");
int index = proto.getPublicDependency(i); if (index < 0 || index >= this.dependencies.length) { throw new DescriptorValidationException(this, "Invalid public dependency index.");
/** * Adds a symbol to the symbol table. If a symbol with the same name * already exists, throws an error. */ void addSymbol(final GenericDescriptor descriptor) throws DescriptorValidationException { validateSymbolName(descriptor); final String fullName = descriptor.getFullName(); final int dotpos = fullName.lastIndexOf('.'); final GenericDescriptor old = descriptorsByName.put(fullName, descriptor); if (old != null) { descriptorsByName.put(fullName, old); if (descriptor.getFile() == old.getFile()) { if (dotpos == -1) { throw new DescriptorValidationException(descriptor, '\"' + fullName + "\" is already defined."); } else { throw new DescriptorValidationException(descriptor, '\"' + fullName.substring(dotpos + 1) + "\" is already defined in \"" + fullName.substring(0, dotpos) + "\"."); } } else { throw new DescriptorValidationException(descriptor, '\"' + fullName + "\" is already defined in file \"" + old.getFile().getName() + "\"."); } } }
/** * Adds a symbol to the symbol table. If a symbol with the same name * already exists, throws an error. */ void addSymbol(final GenericDescriptor descriptor) throws DescriptorValidationException { validateSymbolName(descriptor); final String fullName = descriptor.getFullName(); final int dotpos = fullName.lastIndexOf('.'); final GenericDescriptor old = descriptorsByName.put(fullName, descriptor); if (old != null) { descriptorsByName.put(fullName, old); if (descriptor.getFile() == old.getFile()) { if (dotpos == -1) { throw new DescriptorValidationException(descriptor, '\"' + fullName + "\" is already defined."); } else { throw new DescriptorValidationException(descriptor, '\"' + fullName.substring(dotpos + 1) + "\" is already defined in \"" + fullName.substring(0, dotpos) + "\"."); } } else { throw new DescriptorValidationException(descriptor, '\"' + fullName + "\" is already defined in file \"" + old.getFile().getName() + "\"."); } } }
/** * Adds a symbol to the symbol table. If a symbol with the same name * already exists, throws an error. */ void addSymbol(final GenericDescriptor descriptor) throws DescriptorValidationException { validateSymbolName(descriptor); final String fullName = descriptor.getFullName(); final int dotpos = fullName.lastIndexOf('.'); final GenericDescriptor old = descriptorsByName.put(fullName, descriptor); if (old != null) { descriptorsByName.put(fullName, old); if (descriptor.getFile() == old.getFile()) { if (dotpos == -1) { throw new DescriptorValidationException(descriptor, '\"' + fullName + "\" is already defined."); } else { throw new DescriptorValidationException(descriptor, '\"' + fullName.substring(dotpos + 1) + "\" is already defined in \"" + fullName.substring(0, dotpos) + "\"."); } } else { throw new DescriptorValidationException(descriptor, '\"' + fullName + "\" is already defined in file \"" + old.getFile().getName() + "\"."); } } }
final String name = descriptor.getName(); if (name.length() == 0) { throw new DescriptorValidationException(descriptor, "Missing name."); } else { boolean valid = true; throw new DescriptorValidationException(descriptor, '\"' + name + "\" is not a valid identifier.");