@Test public void testImportTypeMap() { CodeGeneratorRequest request = TestRequestLoader.getImportRequest(); TypeRegistry map = RequestInfo.withTypeRegistry(request).getTypeRegistry(); assertEquals(8, map.typeMap.entrySet().size()); assertEquals("protos.test.protobuf.ContainerMessage", map.resolveMessageType(".quickbuf_unittest.ContainerMessage").toString()); assertEquals("protos.test.protobuf.ForeignEnum", map.resolveMessageType(".quickbuf_unittest.ForeignEnum").toString()); String typeId = request .getProtoFile(1) .getMessageType(0) .getField(6) .getTypeName(); assertEquals("protos.test.protobuf.external.ImportMessage.NestedImportMessage", map.resolveMessageType(typeId).toString()); }
TypeName resolveMessageType(String typeId) { return checkNotNull(typeMap.get(typeId), "Unable to resolve type id: " + typeId); }
TypeRegistry { TypeName resolveMessageType(String typeId) { return checkNotNull(typeMap.get(typeId), "Unable to resolve type id: " + typeId); } }
TypeRegistry { TypeName resolveMessageType(String typeId) { return checkNotNull(typeMap.get(typeId), "Unable to resolve type id: " + typeId); } private  TypeRegistry(); }
TypeRegistry { TypeName resolveMessageType(String typeId) { return checkNotNull(typeMap.get(typeId), "Unable to resolve type id: " + typeId); } private  TypeRegistry();  }
TypeRegistry { TypeName resolveMessageType(String typeId) { return checkNotNull(typeMap.get(typeId), "Unable to resolve type id: " + typeId); } private  TypeRegistry();   }