/** Get a {@code DynamicMessage} representing the default instance of the given type. */
 public static DynamicMessage getDefaultInstance(Descriptor type) {
   int oneofDeclCount = type.toProto().getOneofDeclCount();
   FieldDescriptor[] oneofCases = new FieldDescriptor[oneofDeclCount];
   return new DynamicMessage(
       type,
       FieldSet.<FieldDescriptor>emptySet(),
       oneofCases,
       UnknownFieldSet.getDefaultInstance());
 }
Exemple #2
0
 /** Get a {@code DynamicMessage} representing the default instance of the given type. */
 public static DynamicMessage getDefaultInstance(Descriptor type) {
   return new DynamicMessage(
       type, FieldSet.<FieldDescriptor>emptySet(), UnknownFieldSet.getDefaultInstance());
 }