Home
last modified time | relevance | path

Searched refs:TypeRegistry (Results 1 – 20 of 20) sorted by relevance

/third_party/protobuf/csharp/src/Google.Protobuf/Reflection/
DTypeRegistry.cs40 public sealed class TypeRegistry class
45 …public static TypeRegistry Empty { get; } = new TypeRegistry(new Dictionary<string, MessageDescrip…
49 private TypeRegistry(Dictionary<string, MessageDescriptor> fullNameToMessageMap) in TypeRegistry() method in Google.Protobuf.Reflection.TypeRegistry
78 public static TypeRegistry FromFiles(params FileDescriptor[] fileDescriptors) in FromFiles()
92 public static TypeRegistry FromFiles(IEnumerable<FileDescriptor> fileDescriptors) in FromFiles()
113 public static TypeRegistry FromMessages(params MessageDescriptor[] messageDescriptors) in FromMessages()
129 public static TypeRegistry FromMessages(IEnumerable<MessageDescriptor> messageDescriptors) in FromMessages()
177 internal TypeRegistry Build() in Build()
179 return new TypeRegistry(types); in Build()
/third_party/protobuf/java/core/src/main/java/com/google/protobuf/
DTypeRegistry.java46 public class TypeRegistry { class
47 private static final Logger logger = Logger.getLogger(TypeRegistry.class.getName());
50 private static final TypeRegistry EMPTY =
51 new TypeRegistry(Collections.<String, Descriptor>emptyMap());
54 public static TypeRegistry getEmptyTypeRegistry() { in getEmptyTypeRegistry()
81 TypeRegistry(Map<String, Descriptor> types) { in TypeRegistry() method in TypeRegistry
124 public TypeRegistry build() { in build()
125 TypeRegistry result = new TypeRegistry(types); in build()
DTextFormat.java292 private static final Printer DEFAULT = new Printer(true, TypeRegistry.getEmptyTypeRegistry());
297 private final TypeRegistry typeRegistry;
299 private Printer(boolean escapeNonAscii, TypeRegistry typeRegistry) { in Printer()
323 public Printer usingTypeRegistry(TypeRegistry typeRegistry) { in usingTypeRegistry()
324 if (this.typeRegistry != TypeRegistry.getEmptyTypeRegistry()) { in usingTypeRegistry()
1544 private final TypeRegistry typeRegistry;
1552 TypeRegistry typeRegistry, in Parser()
1579 private TypeRegistry typeRegistry = TypeRegistry.getEmptyTypeRegistry();
1587 public Builder setTypeRegistry(TypeRegistry typeRegistry) { in setTypeRegistry()
/third_party/protobuf/csharp/compatibility_tests/v3.0.0/src/Google.Protobuf.Test/Reflection/
DTypeRegistryTest.cs45 … var registry = TypeRegistry.FromFiles(DurationReflection.Descriptor, StructReflection.Descriptor); in CreateWithFileDescriptor()
55 var registry = TypeRegistry.FromMessages(TestAllTypes.Types.NestedMessage.Descriptor); in TypesFromSameFile()
65 var registry = TypeRegistry.FromMessages(TestAllTypes.Descriptor); in DependenciesAreIncluded()
76 var registry = TypeRegistry.FromFiles( in DuplicateFiles()
84 … private static void AssertDescriptorPresent(TypeRegistry registry, MessageDescriptor descriptor) in AssertDescriptorPresent()
89 … private static void AssertDescriptorAbsent(TypeRegistry registry, MessageDescriptor descriptor) in AssertDescriptorAbsent()
/third_party/protobuf/csharp/src/Google.Protobuf.Test/Reflection/
DTypeRegistryTest.cs45 … var registry = TypeRegistry.FromFiles(DurationReflection.Descriptor, StructReflection.Descriptor); in CreateWithFileDescriptor()
55 var registry = TypeRegistry.FromMessages(TestAllTypes.Types.NestedMessage.Descriptor); in TypesFromSameFile()
65 var registry = TypeRegistry.FromMessages(TestAllTypes.Descriptor); in DependenciesAreIncluded()
76 var registry = TypeRegistry.FromFiles( in DuplicateFiles()
84 … private static void AssertDescriptorPresent(TypeRegistry registry, MessageDescriptor descriptor) in AssertDescriptorPresent()
89 … private static void AssertDescriptorAbsent(TypeRegistry registry, MessageDescriptor descriptor) in AssertDescriptorAbsent()
/third_party/protobuf/java/util/src/main/java/com/google/protobuf/util/
DJsonFormat.java111 com.google.protobuf.TypeRegistry.getEmptyTypeRegistry(), in printer()
112 TypeRegistry.getEmptyTypeRegistry(), in printer()
125 private final com.google.protobuf.TypeRegistry registry;
126 private final TypeRegistry oldRegistry;
143 com.google.protobuf.TypeRegistry registry, in Printer()
144 TypeRegistry oldRegistry, in Printer()
167 public Printer usingTypeRegistry(TypeRegistry oldRegistry) { in usingTypeRegistry()
168 if (this.oldRegistry != TypeRegistry.getEmptyTypeRegistry() in usingTypeRegistry()
169 || this.registry != com.google.protobuf.TypeRegistry.getEmptyTypeRegistry()) { in usingTypeRegistry()
173 com.google.protobuf.TypeRegistry.getEmptyTypeRegistry(), in usingTypeRegistry()
[all …]
/third_party/protobuf/java/core/src/test/java/com/google/protobuf/
DTypeRegistryTest.java48 assertNull(TypeRegistry.getEmptyTypeRegistry().find(descriptor.getFullName())); in findDescriptorByFullName()
52 TypeRegistry.newBuilder().add(descriptor).build().find(descriptor.getFullName())); in findDescriptorByFullName()
59 TypeRegistry.getEmptyTypeRegistry() in findDescriptorByTypeUrl()
64 TypeRegistry.newBuilder() in findDescriptorByTypeUrl()
DTextFormatTest.java547 .usingTypeRegistry(TypeRegistry.newBuilder().add(TestAllTypes.getDescriptor()).build()) in testPrintAny_customBuiltTypeRegistry()
601 .usingTypeRegistry(TypeRegistry.newBuilder().add(TestAllTypes.getDescriptor()).build()) in testPrintAny_anyWithDynamicMessage()
627 .usingTypeRegistry(TypeRegistry.newBuilder().add(TestAllTypes.getDescriptor()).build()) in testPrintAny_anyFromWithNoValueField()
650 .usingTypeRegistry(TypeRegistry.newBuilder().add(TestAllTypes.getDescriptor()).build()) in testPrintAny_anyFromWithNoTypeUrlField()
680 .usingTypeRegistry(TypeRegistry.newBuilder().add(TestAllTypes.getDescriptor()).build()) in testPrintAny_anyWithInvalidFieldType()
691 .setTypeRegistry(TypeRegistry.newBuilder().add(TestAllTypes.getDescriptor()).build()) in testMergeAny_customBuiltTypeRegistry()
/third_party/protobuf/csharp/src/Google.Protobuf/
DJsonFormatter.cs547 MessageDescriptor descriptor = settings.TypeRegistry.Find(typeName); in WriteAny()
811 public TypeRegistry TypeRegistry { get; } property in Google.Protobuf.JsonFormatter.Settings
824 … public Settings(bool formatDefaultValues) : this(formatDefaultValues, TypeRegistry.Empty) in Settings()
834 …public Settings(bool formatDefaultValues, TypeRegistry typeRegistry) : this(formatDefaultValues, t… in Settings()
845 TypeRegistry typeRegistry, in Settings()
849 TypeRegistry = typeRegistry ?? TypeRegistry.Empty; in Settings()
857 …Values(bool formatDefaultValues) => new Settings(formatDefaultValues, TypeRegistry, FormatEnumsAsI…
863 …public Settings WithTypeRegistry(TypeRegistry typeRegistry) => new Settings(FormatDefaultValues, t…
869 …gers(bool formatEnumsAsIntegers) => new Settings(FormatDefaultValues, TypeRegistry, formatEnumsAsI…
DJsonParser.cs537 MessageDescriptor descriptor = settings.TypeRegistry.Find(typeName); in MergeAny()
1015 public TypeRegistry TypeRegistry { get; } property in Google.Protobuf.JsonParser.Settings
1023 … private Settings(int recursionLimit, TypeRegistry typeRegistry, bool ignoreUnknownFields) in Settings()
1026 TypeRegistry = ProtoPreconditions.CheckNotNull(typeRegistry, nameof(typeRegistry)); in Settings()
1034 public Settings(int recursionLimit) : this(recursionLimit, TypeRegistry.Empty) in Settings()
1043 …public Settings(int recursionLimit, TypeRegistry typeRegistry) : this(recursionLimit, typeRegistry… in Settings()
1053 new Settings(RecursionLimit, TypeRegistry, ignoreUnknownFields);
1060 new Settings(recursionLimit, TypeRegistry, IgnoreUnknownFields); in WithRecursionLimit()
1066 public Settings WithTypeRegistry(TypeRegistry typeRegistry) =>
/third_party/protobuf/csharp/src/Google.Protobuf.Conformance/
DProgram.cs51 var typeRegistry = TypeRegistry.FromMessages( in Main()
63 … private static bool RunTest(BinaryReader input, BinaryWriter output, TypeRegistry typeRegistry) in RunTest()
84 …private static ConformanceResponse PerformRequest(ConformanceRequest request, TypeRegistry typeReg… in PerformRequest()
/third_party/protobuf/java/util/src/test/java/com/google/protobuf/util/
DJsonFormatTest.java53 import com.google.protobuf.util.JsonFormat.TypeRegistry;
144 assertRoundTripEquals(message, TypeRegistry.getEmptyTypeRegistry()); in assertRoundTripEquals()
147 private void assertRoundTripEquals(Message message, TypeRegistry registry) throws Exception { in assertRoundTripEquals()
156 private void assertRoundTripEquals(Message message, com.google.protobuf.TypeRegistry registry) in assertRoundTripEquals()
868 com.google.protobuf.TypeRegistry registry = in testAnyFieldsWithCustomAddedTypeRegistry()
869 com.google.protobuf.TypeRegistry.newBuilder().add(content.getDescriptorForType()).build(); in testAnyFieldsWithCustomAddedTypeRegistry()
915 JsonFormat.TypeRegistry registry = in testAnyFields()
916 JsonFormat.TypeRegistry.newBuilder().add(TestAllTypes.getDescriptor()).build(); in testAnyFields()
1096 JsonFormat.TypeRegistry registry = in testAnyInMaps()
1097 JsonFormat.TypeRegistry.newBuilder().add(TestAllTypes.getDescriptor()).build(); in testAnyInMaps()
[all …]
/third_party/protobuf/conformance/
DConformanceJava.java40 import com.google.protobuf.util.JsonFormat.TypeRegistry;
50 private TypeRegistry typeRegistry;
382 typeRegistry = TypeRegistry.newBuilder().add( in run()
/third_party/protobuf/csharp/src/Google.Protobuf.Test/
DJsonFormatterTest.cs572 …r = new JsonFormatter(JsonFormatter.Settings.Default.WithTypeRegistry(TypeRegistry.FromMessages(Ti… in AnyWellKnownType()
581 …r = new JsonFormatter(JsonFormatter.Settings.Default.WithTypeRegistry(TypeRegistry.FromMessages(Te… in AnyMessageType()
590 …r = new JsonFormatter(JsonFormatter.Settings.Default.WithTypeRegistry(TypeRegistry.FromMessages(Te… in AnyMessageType_CustomPrefix()
599 … var registry = TypeRegistry.FromMessages(TestWellKnownTypes.Descriptor, TestAllTypes.Descriptor); in AnyNested()
DJsonParserTest.cs823 var registry = TypeRegistry.FromMessages(TestAllTypes.Descriptor); in Any_RegularMessage()
824 …var formatter = new JsonFormatter(new JsonFormatter.Settings(false, TypeRegistry.FromMessages(Test… in Any_RegularMessage()
837 var registry = TypeRegistry.FromMessages(TestAllTypes.Descriptor); in Any_CustomPrefix()
862 var registry = TypeRegistry.FromMessages(Timestamp.Descriptor); in Any_WellKnownType()
876 … var registry = TypeRegistry.FromMessages(TestWellKnownTypes.Descriptor, TestAllTypes.Descriptor); in Any_Nested()
DIssuesTest.cs67 …var settings = new JsonParser.Settings(10, TypeRegistry.FromFiles(UnittestIssuesReflection.Descrip… in JsonNameParseTest()
/third_party/protobuf/csharp/compatibility_tests/v3.0.0/src/Google.Protobuf.Test/
DJsonParserTest.cs805 var registry = TypeRegistry.FromMessages(TestAllTypes.Descriptor); in Any_RegularMessage()
806 …var formatter = new JsonFormatter(new JsonFormatter.Settings(false, TypeRegistry.FromMessages(Test… in Any_RegularMessage()
819 var registry = TypeRegistry.FromMessages(TestAllTypes.Descriptor); in Any_CustomPrefix()
844 var registry = TypeRegistry.FromMessages(Timestamp.Descriptor); in Any_WellKnownType()
858 … var registry = TypeRegistry.FromMessages(TestWellKnownTypes.Descriptor, TestAllTypes.Descriptor); in Any_Nested()
DIssuesTest.cs66 …var settings = new JsonParser.Settings(10, TypeRegistry.FromFiles(UnittestIssuesReflection.Descrip… in JsonNameParseTest()
/third_party/protobuf/
DCHANGES.txt297 * Update TextFormat to make use of the new TypeRegistry.
299 * Update JsonFormat to make use of the new TypeRegistry.
303 …Make a copy of JsonFormat.TypeRegistry at the protobuf top level package. This will eventually rep…
1471 * Library: Added TypeRegistry to support JSON parsing/formatting of Any.
DMakefile.am246 csharp/src/Google.Protobuf/Reflection/TypeRegistry.cs \
390 java/core/src/main/java/com/google/protobuf/TypeRegistry.java \