/** The syntax of the .proto file. */ public enum Syntax { UNKNOWN("unknown"), PROTO2("proto2"), PROTO3("proto3"); Syntax(String name) { this.name = name; } private final String name; }
Descriptor(final String fullname) throws DescriptorValidationException { String name = fullname; String packageName = ""; int pos = fullname.lastIndexOf('.'); if (pos != -1) { name = fullname.substring(pos + 1); packageName = fullname.substring(0, pos); } this.index = 0; this.proto = DescriptorProto.newBuilder().setName(name).addExtensionRange( DescriptorProto.ExtensionRange.newBuilder().setStart(1) .setEnd(536870912).build()).build(); this.fullName = fullname; this.containingType = null; this.nestedTypes = new Descriptor[0]; this.enumTypes = new EnumDescriptor[0]; this.fields = new FieldDescriptor[0]; this.extensions = new FieldDescriptor[0]; this.oneofs = new OneofDescriptor[0]; // Create a placeholder FileDescriptor to hold this message. this.file = new FileDescriptor(packageName, this); }
new FileDescriptor(proto, dependencies, pool);
final FileDescriptor result = new FileDescriptor( proto, dependencies, pool, allowUnknownDependencies); result.crossLink();
Descriptor(final String fullname) throws DescriptorValidationException { String name = fullname; String packageName = ""; int pos = fullname.lastIndexOf('.'); if (pos != -1) { name = fullname.substring(pos + 1); packageName = fullname.substring(0, pos); } this.index = 0; this.proto = DescriptorProto.newBuilder().setName(name).addExtensionRange( DescriptorProto.ExtensionRange.newBuilder().setStart(1) .setEnd(536870912).build()).build(); this.fullName = fullname; this.containingType = null; this.nestedTypes = new Descriptor[0]; this.enumTypes = new EnumDescriptor[0]; this.fields = new FieldDescriptor[0]; this.extensions = new FieldDescriptor[0]; this.oneofs = new OneofDescriptor[0]; // Create a placeholder FileDescriptor to hold this message. this.file = new FileDescriptor(packageName, this); }
Descriptor(final String fullname) throws DescriptorValidationException { String name = fullname; String packageName = ""; int pos = fullname.lastIndexOf('.'); if (pos != -1) { name = fullname.substring(pos + 1); packageName = fullname.substring(0, pos); } this.index = 0; this.proto = DescriptorProto.newBuilder().setName(name).addExtensionRange( DescriptorProto.ExtensionRange.newBuilder().setStart(1) .setEnd(536870912).build()).build(); this.fullName = fullname; this.containingType = null; this.nestedTypes = new Descriptor[0]; this.enumTypes = new EnumDescriptor[0]; this.fields = new FieldDescriptor[0]; this.extensions = new FieldDescriptor[0]; this.oneofs = new OneofDescriptor[0]; // Create a placeholder FileDescriptor to hold this message. this.file = new FileDescriptor(packageName, this); }
/** The syntax of the .proto file. */ public enum Syntax { UNKNOWN("unknown"), PROTO2("proto2"), PROTO3("proto3"); Syntax(String name) { this.name = name; } private final String name; }