Package com.google.protobuf

Examples of com.google.protobuf.ExtensionRegistry.findExtensionByName()


    // Make sure protobuf extensions get registered
    ExtensionRegistry registry = ExtensionRegistry.newInstance();
    rkv.registerProtoExtensions(registry);
    FieldDescriptor fd;
    fd = MockKeyVersionProto.MockKeyVersionCore.extension.getDescriptor();
    assertEquals(fd, registry.findExtensionByName(fd.getFullName()).descriptor);
    fd = MockKeyVersionProto.MockKeyVersionData.extension.getDescriptor();
    assertEquals(fd, registry.findExtensionByName(fd.getFullName()).descriptor);
  }

  /**
 
View Full Code Here


    rkv.registerProtoExtensions(registry);
    FieldDescriptor fd;
    fd = MockKeyVersionProto.MockKeyVersionCore.extension.getDescriptor();
    assertEquals(fd, registry.findExtensionByName(fd.getFullName()).descriptor);
    fd = MockKeyVersionProto.MockKeyVersionData.extension.getDescriptor();
    assertEquals(fd, registry.findExtensionByName(fd.getFullName()).descriptor);
  }

  /**
   * Tests rejection of a key version without a builder inner-class.
   */
 
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.