Home
last modified time | relevance | path

Searched refs:defaultInstance (Results 1 – 25 of 34) sorted by relevance

12

/external/grpc-grpc-java/protobuf-lite/src/main/java/io/grpc/protobuf/lite/
DProtoLiteUtils.java82 public static <T extends MessageLite> Marshaller<T> marshaller(T defaultInstance) { in marshaller() argument
84 return new MessageMarshaller<T>(defaultInstance); in marshaller()
93 T defaultInstance) { in metadataMarshaller() argument
94 return new MetadataMarshaller<T>(defaultInstance); in metadataMarshaller()
123 private final T defaultInstance; field in ProtoLiteUtils.MessageMarshaller
126 MessageMarshaller(T defaultInstance) { in MessageMarshaller() argument
127 this.defaultInstance = defaultInstance; in MessageMarshaller()
128 parser = (Parser<T>) defaultInstance.getParserForType(); in MessageMarshaller()
136 return (Class<T>) defaultInstance.getClass(); in getMessageClass()
141 return defaultInstance; in getMessagePrototype()
[all …]
/external/protobuf/java/core/src/main/java/com/google/protobuf/
DStructuralMessageInfo.java49 private final MessageLite defaultInstance; field in StructuralMessageInfo
62 Object defaultInstance) { in StructuralMessageInfo() argument
67 this.defaultInstance = (MessageLite) checkNotNull(defaultInstance, "defaultInstance"); in StructuralMessageInfo()
97 return defaultInstance; in getDefaultInstance()
117 private Object defaultInstance; field in StructuralMessageInfo.Builder
127 public void withDefaultInstance(Object defaultInstance) { in withDefaultInstance() argument
128 this.defaultInstance = defaultInstance; in withDefaultInstance()
164 defaultInstance); in build()
DMessageReflection.java300 Message defaultInstance) in parseGroup() argument
311 Message defaultInstance) in parseMessage() argument
323 Message defaultInstance) in parseMessageFromBytes() argument
335 Descriptors.FieldDescriptor descriptor, Message defaultInstance); in newMergeTargetForField() argument
343 Descriptors.FieldDescriptor descriptor, Message defaultInstance); in newEmptyTargetForField() argument
435 Message defaultInstance) in parseGroup() argument
439 if (defaultInstance != null) { in parseGroup()
440 subBuilder = defaultInstance.newBuilderForType(); in parseGroup()
459 Message defaultInstance) in parseMessage() argument
463 if (defaultInstance != null) { in parseMessage()
[all …]
DGeneratedMessageLite.java312 Class<T> clazz, T defaultInstance) { in registerDefaultInstance() argument
313 defaultInstanceMap.put(clazz, defaultInstance); in registerDefaultInstance()
317 MessageLite defaultInstance, String info, Object[] objects) { in newMessageInfo() argument
318 return new RawMessageInfo(defaultInstance, info, objects); in newMessageInfo()
336 private final MessageType defaultInstance; field in GeneratedMessageLite.Builder
340 protected Builder(MessageType defaultInstance) { in Builder() argument
341 this.defaultInstance = defaultInstance; in Builder()
343 (MessageType) defaultInstance.dynamicMethod(MethodToInvoke.NEW_MUTABLE_INSTANCE); in Builder()
419 return defaultInstance; in getDefaultInstanceForType()
518 MessageType defaultInstance, in parseUnknownField() argument
[all …]
DRawMessageInfo.java39 private final MessageLite defaultInstance; field in RawMessageInfo
179 RawMessageInfo(MessageLite defaultInstance, String info, Object[] objects) { in RawMessageInfo() argument
180 this.defaultInstance = defaultInstance; in RawMessageInfo()
208 return defaultInstance; in getDefaultInstance()
DLazyField.java52 private final MessageLite defaultInstance; field in LazyField
55 MessageLite defaultInstance, ExtensionRegistryLite extensionRegistry, ByteString bytes) { in LazyField() argument
58 this.defaultInstance = defaultInstance; in LazyField()
63 return super.containsDefaultInstance() || value == defaultInstance; in containsDefaultInstance()
67 return getValue(defaultInstance); in getValue()
DMessageSetSchema.java39 private final MessageLite defaultInstance; field in MessageSetSchema
47 MessageLite defaultInstance) { in MessageSetSchema() argument
49 this.hasExtensions = extensionSchema.hasExtensions(defaultInstance); in MessageSetSchema()
51 this.defaultInstance = defaultInstance; in MessageSetSchema()
57 MessageLite defaultInstance) { in newSchema() argument
58 return new MessageSetSchema<T>(unknownFieldSchema, extensionSchema, defaultInstance); in newSchema()
64 return (T) defaultInstance.newBuilderForType().buildPartial(); in newInstance()
150 registers.extensionRegistry, defaultInstance, in mergeFrom()
185 .findExtensionByNumber(registers.extensionRegistry, defaultInstance, typeId); in mergeFrom()
287 extensionRegistry, defaultInstance, WireFormat.getTagFieldNumber(startTag)); in parseMessageSetItemOrUnknownField()
[all …]
DExtensionRegistry.java118 public final Message defaultInstance; field in ExtensionRegistry.ExtensionInfo
122 defaultInstance = null; in ExtensionInfo()
125 private ExtensionInfo(final FieldDescriptor descriptor, final Message defaultInstance) { in ExtensionInfo() argument
127 this.defaultInstance = defaultInstance; in ExtensionInfo()
259 public void add(final FieldDescriptor type, final Message defaultInstance) { in add() argument
264 add(new ExtensionInfo(type, defaultInstance), Extension.ExtensionType.IMMUTABLE); in add()
DLazyFieldLite.java222 public MessageLite getValue(MessageLite defaultInstance) { in getValue() argument
223 ensureInitialized(defaultInstance); in getValue()
405 protected void ensureInitialized(MessageLite defaultInstance) { in ensureInitialized() argument
417 defaultInstance.getParserForType().parseFrom(delayedBytes, extensionRegistry); in ensureInitialized()
421 this.value = defaultInstance; in ensureInitialized()
427 this.value = defaultInstance; in ensureInitialized()
DNewInstanceSchemaLite.java35 public Object newInstance(Object defaultInstance) { in newInstance() argument
36 return ((GeneratedMessageLite) defaultInstance) in newInstance()
DNewInstanceSchemaFull.java35 public Object newInstance(Object defaultInstance) { in newInstance() argument
36 return ((GeneratedMessageV3) defaultInstance) in newInstance()
DExtensionSchemaFull.java276 value = reader.readGroup(extension.defaultInstance.getClass(), extensionRegistry); in parseExtension()
280 value = reader.readMessage(extension.defaultInstance.getClass(), extensionRegistry); in parseExtension()
498 ExtensionRegistryLite extensionRegistry, MessageLite defaultInstance, int number) { in findExtensionByNumber() argument
500 .findExtensionByNumber(((Message) defaultInstance).getDescriptorForType(), number); in findExtensionByNumber()
514 reader.readMessage(extensionInfo.defaultInstance.getClass(), extensionRegistry); in parseLengthPrefixedMessageSetItem()
519 new LazyField(extensionInfo.defaultInstance, extensionRegistry, reader.readBytes())); in parseLengthPrefixedMessageSetItem()
531 Object value = extensionInfo.defaultInstance.newBuilderForType().buildPartial(); in parseMessageSetItem()
544 new LazyField(extensionInfo.defaultInstance, extensionRegistry, data)); in parseMessageSetItem()
DRpcUtil.java69 final Type defaultInstance) { in generalizeCallback() argument
77 typedParameter = copyAsType(defaultInstance, parameter); in generalizeCallback()
DNewInstanceSchema.java35 Object newInstance(Object defaultInstance); in newInstance() argument
DMapEntry.java59 MapEntry<K, V> defaultInstance, in Metadata() argument
62 super(keyType, defaultInstance.key, valueType, defaultInstance.value); in Metadata()
DExtensionSchema.java78 ExtensionRegistryLite extensionRegistry, MessageLite defaultInstance, int number); in findExtensionByNumber() argument
DGeneratedMessage.java1619 final Message defaultInstance) {
1631 defaultInstance,
1639 final Message defaultInstance) {
1646 defaultInstance,
1679 final Class singularType, final Message defaultInstance) {
1691 defaultInstance,
1705 final Class singularType, final Message defaultInstance,
1728 defaultInstance,
DUnknownFieldSet.java77 return defaultInstance; in getDefaultInstance()
82 return defaultInstance; in getDefaultInstanceForType()
85 private static final UnknownFieldSet defaultInstance = field in UnknownFieldSet
/external/protobuf/java/core/src/test/java/com/google/protobuf/
DCheckUtf8Test.java130 private void assertParseBadUtf8(MessageLite defaultInstance, byte[] data) throws Exception { in assertParseBadUtf8() argument
133 defaultInstance.getParserForType().parseFrom(data); in assertParseBadUtf8()
139 defaultInstance.newBuilderForType().mergeFrom(data); in assertParseBadUtf8()
145 defaultInstance.getParserForType().parseFrom(new ByteArrayInputStream(data)); in assertParseBadUtf8()
151 defaultInstance.newBuilderForType().mergeFrom(new ByteArrayInputStream(data)); in assertParseBadUtf8()
DWireFormatLiteTest.java508 MessageLite defaultInstance, byte[] data, int offset, int length) { in assertInvalidWireFormat() argument
511 defaultInstance.newBuilderForType().mergeFrom(data, offset, length); in assertInvalidWireFormat()
517 defaultInstance.getParserForType().parseFrom(data, offset, length); in assertInvalidWireFormat()
524 defaultInstance.newBuilderForType().mergeFrom(input); in assertInvalidWireFormat()
531 defaultInstance.getParserForType().parseFrom(input); in assertInvalidWireFormat()
538 private void assertInvalidWireFormat(MessageLite defaultInstance, byte[] data) { in assertInvalidWireFormat() argument
539 assertInvalidWireFormat(defaultInstance, data, 0, data.length); in assertInvalidWireFormat()
633 private void assertAccepted(MessageLite defaultInstance, byte[] data) throws Exception { in assertAccepted() argument
634 MessageLite message1 = defaultInstance.newBuilderForType().mergeFrom(data).build(); in assertAccepted()
635 MessageLite message2 = defaultInstance.getParserForType().parseFrom(data); in assertAccepted()
[all …]
DFieldPresenceTest.java226 DynamicMessage defaultInstance = DynamicMessage.getDefaultInstance(descriptor); in testFieldPresenceDynamicMessage() local
228 DynamicMessage message = defaultInstance.newBuilderForType().build(); in testFieldPresenceDynamicMessage()
237 defaultInstance in testFieldPresenceDynamicMessage()
/external/grpc-grpc-java/examples/src/main/java/io/grpc/examples/advanced/
DJsonMarshaller.java47 public static <T extends Message> Marshaller<T> jsonMarshaller(final T defaultInstance) { in jsonMarshaller() argument
50 return jsonMarshaller(defaultInstance, parser, printer); in jsonMarshaller()
59 final T defaultInstance, final Parser parser, final Printer printer) { in jsonMarshaller() argument
79 Builder builder = defaultInstance.newBuilderForType(); in jsonMarshaller()
/external/grpc-grpc-java/protobuf/src/main/java/io/grpc/protobuf/
DProtoUtils.java35 public static <T extends Message> Marshaller<T> marshaller(final T defaultInstance) { in marshaller() argument
36 return ProtoLiteUtils.marshaller(defaultInstance); in marshaller()
/external/dagger2/java/dagger/internal/codegen/serialization/
DProtoSerialization.java46 AnnotationValue value, T defaultInstance) { in fromAnnotationValue() argument
50 message = defaultInstance.getParserForType().parseFrom(bytes); in fromAnnotationValue()
/external/protobuf/ruby/src/main/java/com/google/protobuf/jruby/
DSentinelOuterClass.java719 …private static final com.google.protobuf.jruby.SentinelOuterClass.Sentinel defaultInstance;static { field in SentinelOuterClass.Sentinel
720 defaultInstance = new com.google.protobuf.jruby.SentinelOuterClass.Sentinel();
724 return defaultInstance; in getDefaultInstance()
728 return defaultInstance; in getDefaultInstanceForType()

12