@@ -98,8 +98,8 @@ static class FileDescriptorProto
98
98
@ JsonProperty ("package" )
99
99
public String packageName ;
100
100
public String [] dependency ;
101
- public long [] public_dependency ;
102
- public long [] weak_dependency ;
101
+ public int [] public_dependency ;
102
+ public int [] weak_dependency ;
103
103
public DescriptorProto [] message_type ;
104
104
public EnumDescriptorProto [] enum_type ;
105
105
public ServiceDescriptorProto [] service ;
@@ -127,8 +127,8 @@ static class DescriptorProto
127
127
128
128
class ExtensionRange
129
129
{
130
- public long start ;
131
- public long end ;
130
+ public int start ;
131
+ public int end ;
132
132
}
133
133
134
134
public ExtensionRange [] extension_range ;
@@ -137,6 +137,8 @@ class ExtensionRange
137
137
138
138
class ReservedRange
139
139
{
140
+ public int start ; // Inclusive.
141
+ public int end ; // Exclusive.
140
142
}
141
143
142
144
public ReservedRange [] reserved_range ;
@@ -219,42 +221,6 @@ public MessageElement buildMessageElement()
219
221
220
222
static class FieldDescriptorProto
221
223
{
222
- static private Map <Type , DataType > scalarTypeMap = new HashMap ();
223
- static private Map <Label , FieldElement .Label > labelMap = new HashMap ();
224
-
225
- static {
226
- scalarTypeMap .put (Type .TYPE_DOUBLE , DataType .ScalarType .DOUBLE );
227
- scalarTypeMap .put (Type .TYPE_FLOAT , DataType .ScalarType .FLOAT );
228
- scalarTypeMap .put (Type .TYPE_INT64 , DataType .ScalarType .INT64 );
229
- scalarTypeMap .put (Type .TYPE_UINT64 , DataType .ScalarType .UINT64 );
230
- scalarTypeMap .put (Type .TYPE_INT32 , DataType .ScalarType .INT32 );
231
- scalarTypeMap .put (Type .TYPE_FIXED64 , DataType .ScalarType .FIXED64 );
232
- scalarTypeMap .put (Type .TYPE_FIXED32 , DataType .ScalarType .FIXED32 );
233
- scalarTypeMap .put (Type .TYPE_BOOL , DataType .ScalarType .BOOL );
234
- scalarTypeMap .put (Type .TYPE_STRING , DataType .ScalarType .STRING );
235
- scalarTypeMap .put (Type .TYPE_BYTES , DataType .ScalarType .BYTES );
236
- scalarTypeMap .put (Type .TYPE_UINT32 , DataType .ScalarType .UINT32 );
237
- scalarTypeMap .put (Type .TYPE_SFIXED32 , DataType .ScalarType .SFIXED32 );
238
- scalarTypeMap .put (Type .TYPE_SFIXED64 , DataType .ScalarType .SFIXED64 );
239
- scalarTypeMap .put (Type .TYPE_SINT32 , DataType .ScalarType .SINT32 );
240
- scalarTypeMap .put (Type .TYPE_SINT64 , DataType .ScalarType .SINT64 );
241
-
242
- labelMap .put (Label .LABEL_OPTIONAL , FieldElement .Label .OPTIONAL );
243
- labelMap .put (Label .LABEL_REQUIRED , FieldElement .Label .REQUIRED );
244
- labelMap .put (Label .LABEL_REPEATED , FieldElement .Label .REPEATED );
245
- }
246
-
247
- public String name ;
248
- public int number ;
249
- public Label label ;
250
- public Type type ;
251
- public String type_name ;
252
- public String extendee ;
253
- public String default_value ;
254
- public long oneof_index ;
255
- public String json_name ;
256
- public FieldOptions options ;
257
-
258
224
enum Type
259
225
{
260
226
TYPE_DOUBLE ,
@@ -284,6 +250,42 @@ enum Label
284
250
LABEL_REPEATED
285
251
}
286
252
253
+ public String name ;
254
+ public int number ;
255
+ public Label label ;
256
+ public Type type ;
257
+ public String type_name ;
258
+ public String extendee ;
259
+ public String default_value ;
260
+ public int oneof_index ;
261
+ public String json_name ;
262
+ public FieldOptions options ;
263
+
264
+ static private Map <Type , DataType > scalarTypeMap = new HashMap ();
265
+ static private Map <Label , FieldElement .Label > labelMap = new HashMap ();
266
+
267
+ static {
268
+ scalarTypeMap .put (Type .TYPE_DOUBLE , DataType .ScalarType .DOUBLE );
269
+ scalarTypeMap .put (Type .TYPE_FLOAT , DataType .ScalarType .FLOAT );
270
+ scalarTypeMap .put (Type .TYPE_INT64 , DataType .ScalarType .INT64 );
271
+ scalarTypeMap .put (Type .TYPE_UINT64 , DataType .ScalarType .UINT64 );
272
+ scalarTypeMap .put (Type .TYPE_INT32 , DataType .ScalarType .INT32 );
273
+ scalarTypeMap .put (Type .TYPE_FIXED64 , DataType .ScalarType .FIXED64 );
274
+ scalarTypeMap .put (Type .TYPE_FIXED32 , DataType .ScalarType .FIXED32 );
275
+ scalarTypeMap .put (Type .TYPE_BOOL , DataType .ScalarType .BOOL );
276
+ scalarTypeMap .put (Type .TYPE_STRING , DataType .ScalarType .STRING );
277
+ scalarTypeMap .put (Type .TYPE_BYTES , DataType .ScalarType .BYTES );
278
+ scalarTypeMap .put (Type .TYPE_UINT32 , DataType .ScalarType .UINT32 );
279
+ scalarTypeMap .put (Type .TYPE_SFIXED32 , DataType .ScalarType .SFIXED32 );
280
+ scalarTypeMap .put (Type .TYPE_SFIXED64 , DataType .ScalarType .SFIXED64 );
281
+ scalarTypeMap .put (Type .TYPE_SINT32 , DataType .ScalarType .SINT32 );
282
+ scalarTypeMap .put (Type .TYPE_SINT64 , DataType .ScalarType .SINT64 );
283
+
284
+ labelMap .put (Label .LABEL_OPTIONAL , FieldElement .Label .OPTIONAL );
285
+ labelMap .put (Label .LABEL_REQUIRED , FieldElement .Label .REQUIRED );
286
+ labelMap .put (Label .LABEL_REPEATED , FieldElement .Label .REPEATED );
287
+ }
288
+
287
289
public DataType getDataType ()
288
290
{
289
291
return scalarTypeMap .get (type );
@@ -342,6 +344,9 @@ static class FileOptions
342
344
343
345
enum OptimizeMode
344
346
{
347
+ SPEED ,
348
+ CODE_SIZE ,
349
+ LITE_RUNTIME
345
350
}
346
351
347
352
public OptimizeMode optimize_for ; // [default=SPEED];
@@ -431,7 +436,9 @@ static class MethodOptions
431
436
432
437
enum IdempotencyLevel
433
438
{
434
- IDEMPOTENCY_UNKNOWN ;
439
+ IDEMPOTENCY_UNKNOWN ,
440
+ NO_SIDE_EFFECTS ,
441
+ IDEMPOTENT
435
442
}
436
443
437
444
public IdempotencyLevel idempotency_level ; // [default=IDEMPOTENCY_UNKNOWN];
@@ -462,8 +469,8 @@ static class SourceCodeInfo
462
469
463
470
class Location
464
471
{
465
- public long [] path ; // [packed=true];
466
- public long [] span ; // [packed=true];
472
+ public int [] path ; // [packed=true];
473
+ public int [] span ; // [packed=true];
467
474
public String leading_comments ;
468
475
public String trailing_comments ;
469
476
public String [] leading_detached_comments ;
@@ -478,8 +485,8 @@ class Annotation
478
485
{
479
486
public long [] path ; // [packed=true];
480
487
public String source_file ;
481
- public long begin ;
482
- public long end ;
488
+ public int begin ;
489
+ public int end ;
483
490
}
484
491
}
485
492
0 commit comments