Home
last modified time | relevance | path

Searched refs:fieldDescriptor (Results 1 – 23 of 23) sorted by relevance

/external/protobuf/ruby/src/main/java/com/google/protobuf/jruby/
DRubyMessage.java87 final Descriptors.FieldDescriptor fieldDescriptor = findField(context, key); in initialize()
91 if (Utils.isMapEntry(fieldDescriptor)) { in initialize()
95 final RubyMap map = newMapForField(context, fieldDescriptor); in initialize()
97 maps.put(fieldDescriptor, map); in initialize()
98 } else if (fieldDescriptor.isRepeated()) { in initialize()
101 … RubyRepeatedField repeatedField = rubyToRepeatedField(context, fieldDescriptor, value); in initialize()
102 addRepeatedField(fieldDescriptor, repeatedField); in initialize()
104 Descriptors.OneofDescriptor oneof = fieldDescriptor.getContainingOneof(); in initialize()
106 oneofCases.put(oneof, fieldDescriptor); in initialize()
109 …if (value instanceof RubyHash && fieldDescriptor.getType() == Descriptors.FieldDescriptor.Type.MES… in initialize()
[all …]
DRubyDescriptorPool.java140 for (Descriptors.FieldDescriptor fieldDescriptor : descriptor.getFields()) { in buildFileDescriptor()
141 if (fieldDescriptor.isRequired()) { in buildFileDescriptor()
144 … RubyFieldDescriptor rubyFieldDescriptor = rubyDescriptor.lookup(fieldDescriptor.getName()); in buildFileDescriptor()
145 rubyFieldDescriptor.setFieldDef(fieldDescriptor); in buildFileDescriptor()
146 if (fieldDescriptor.getType() == Descriptors.FieldDescriptor.Type.MESSAGE) { in buildFileDescriptor()
148 … runtime.newString(Utils.unescapeIdentifier(fieldDescriptor.getMessageType().getName()))); in buildFileDescriptor()
151 if (fieldDescriptor.getType() == Descriptors.FieldDescriptor.Type.ENUM) { in buildFileDescriptor()
153 … runtime.newString(Utils.unescapeIdentifier(fieldDescriptor.getEnumType().getName()))); in buildFileDescriptor()
DRubyOneofDescriptor.java85 RubyFieldDescriptor fieldDescriptor = (RubyFieldDescriptor) obj; in addField() local
86 fieldDescriptor.setOneofName(this.name); in addField()
87 fields.add(fieldDescriptor); in addField()
117 RubyFieldDescriptor fieldDescriptor = fields.get(0); in getOneofDescriptor() local
118 return fieldDescriptor.getFieldDef().getContainingOneof(); in getOneofDescriptor()
DRubyOneofBuilderContext.java76 RubyFieldDescriptor fieldDescriptor = Utils.msgdefCreateField(context, "optional", in optional() local
78 descriptor.addField(context, fieldDescriptor); in optional()
DUtils.java230 public static boolean isMapEntry(Descriptors.FieldDescriptor fieldDescriptor) { in isMapEntry() argument
231 return fieldDescriptor.getType() == Descriptors.FieldDescriptor.Type.MESSAGE && in isMapEntry()
232 fieldDescriptor.isRepeated() && in isMapEntry()
233 fieldDescriptor.getMessageType().getOptions().getMapEntry(); in isMapEntry()
DRubyFieldDescriptor.java241 protected void setFieldDef(Descriptors.FieldDescriptor fieldDescriptor) { in setFieldDef() argument
242 this.fieldDef = fieldDescriptor; in setFieldDef()
DRubyDescriptor.java183 for (RubyFieldDescriptor fieldDescriptor : def.getFields()) { in addOneof()
184 addField(context, fieldDescriptor); in addOneof()
/external/protobuf/java/core/src/main/java/com/google/protobuf/
DTextFormatParseInfoTree.java97 public List<TextFormatParseLocation> getLocations(final FieldDescriptor fieldDescriptor) { in getLocations() argument
98 List<TextFormatParseLocation> result = locationsFromField.get(fieldDescriptor); in getLocations()
113 public TextFormatParseLocation getLocation(final FieldDescriptor fieldDescriptor, int index) { in getLocation() argument
114 return getFromList(getLocations(fieldDescriptor), index, fieldDescriptor); in getLocation()
123 public List<TextFormatParseInfoTree> getNestedTrees(final FieldDescriptor fieldDescriptor) { in getNestedTrees() argument
124 List<TextFormatParseInfoTree> result = subtreesFromField.get(fieldDescriptor); in getNestedTrees()
137 public TextFormatParseInfoTree getNestedTree(final FieldDescriptor fieldDescriptor, int index) { in getNestedTree() argument
138 return getFromList(getNestedTrees(fieldDescriptor), index, fieldDescriptor); in getNestedTree()
150 private static <T> T getFromList(List<T> list, int index, FieldDescriptor fieldDescriptor) { in getFromList() argument
155 fieldDescriptor == null ? "<null>" : fieldDescriptor.getName(), index)); in getFromList()
[all …]
/external/protobuf/csharp/src/Google.Protobuf/Reflection/
DMessageDescriptor.cs338 var fieldDescriptor = messageDescriptor.FindFieldByNumber(number);
339 if (fieldDescriptor == null)
343 return fieldDescriptor;
358 var fieldDescriptor = messageDescriptor.FindFieldByName(name);
359 if (fieldDescriptor == null)
363 return fieldDescriptor;
/external/protobuf/objectivec/Tests/
DGPBDescriptorTests.m289 GPBFieldDescriptor *fieldDescriptor =
293 XCTAssertTrue([fieldDescriptor isValidEnumValue:1]);
294 XCTAssertTrue([fieldDescriptor isValidEnumValue:2]);
295 XCTAssertTrue([fieldDescriptor isValidEnumValue:3]);
296 XCTAssertTrue([fieldDescriptor isValidEnumValue:-1]);
299 XCTAssertFalse([fieldDescriptor isValidEnumValue:4]);
300 XCTAssertFalse([fieldDescriptor isValidEnumValue:0]);
301 XCTAssertFalse([fieldDescriptor isValidEnumValue:-2]);
DGPBMessageTests.m446 GPBFieldDescriptor *fieldDescriptor =
448 XCTAssertNotNil(fieldDescriptor);
449 GPBGenericValue defaultValue = [fieldDescriptor defaultValue];
456 fieldDescriptor = [descriptor fieldWithName:@"defaultString"];
457 XCTAssertNotNil(fieldDescriptor);
458 defaultValue = [fieldDescriptor defaultValue];
467 fieldDescriptor = [descriptor fieldWithName:@"defaultString"];
468 XCTAssertNotNil(fieldDescriptor);
469 defaultValue = [fieldDescriptor defaultValue];
484 fieldDescriptor = [descriptor fieldWithName:@"defaultBytes"];
[all …]
DGPBMessageTests+Runtime.m2456 GPBFieldDescriptor *fieldDescriptor = [[message descriptor] fieldWithName:@"repeatedStringArray"];
2457 XCTAssertNotNil(fieldDescriptor);
2458 NSMutableArray *fieldArray = GPBGetMessageRepeatedField(message, fieldDescriptor);
2465 GPBFieldDescriptor *fieldDescriptor = [[message descriptor] fieldWithName:@"repeatedStringArray"];
2466 XCTAssertNotNil(fieldDescriptor);
2469 GPBSetMessageRepeatedField(message, fieldDescriptor, fieldArray);
2476 GPBFieldDescriptor *fieldDescriptor = [[message descriptor] fieldWithName:@"mapStringString"];
2477 XCTAssertNotNil(fieldDescriptor);
2478 NSMutableDictionary *fieldMap = GPBGetMessageMapField(message, fieldDescriptor);
2485 GPBFieldDescriptor *fieldDescriptor = [[message descriptor] fieldWithName:@"mapStringString"];
[all …]
/external/protobuf/java/core/src/test/java/com/google/protobuf/
DGeneratedMessageTest.java1074 FieldDescriptor fieldDescriptor = descriptor.findFieldByName("optional_nested_message"); in testGetFieldBuilder() local
1083 .newBuilderForField(fieldDescriptor) in testGetFieldBuilder()
1084 .mergeFrom((Message) builder1.getField(fieldDescriptor)); in testGetFieldBuilder()
1088 builder1.setField(fieldDescriptor, fieldBuilder1.build()); in testGetFieldBuilder()
1115 Message.Builder fieldBuilder2 = builder2.getFieldBuilder(fieldDescriptor); in testGetFieldBuilder()
1119 builder2.setField(fieldDescriptor, fieldBuilder2.build()); in testGetFieldBuilder()
1149 FieldDescriptor fieldDescriptor = descriptor.findFieldByName("optional_nested_message"); in testGetFieldBuilderWithInitializedValue() local
1154 (NestedMessage.Builder) builder.getFieldBuilder(fieldDescriptor); in testGetFieldBuilderWithInitializedValue()
1162 fieldBuilder = (NestedMessage.Builder) builder.getFieldBuilder(fieldDescriptor); in testGetFieldBuilderWithInitializedValue()
1510 FieldDescriptor fieldDescriptor = descriptor.findFieldByName("repeated_nested_message"); in testGetRepeatedFieldBuilder() local
[all …]
DMapTest.java1375 FieldDescriptor fieldDescriptor = in testInitFromPartialDynamicMessage() local
1377 Descriptor mapEntryType = fieldDescriptor.getMessageType(); in testInitFromPartialDynamicMessage()
1383 fieldDescriptor, in testInitFromPartialDynamicMessage()
1396 FieldDescriptor fieldDescriptor = in testInitFromFullyDynamicMessage() local
1398 Descriptor mapEntryType = fieldDescriptor.getMessageType(); in testInitFromFullyDynamicMessage()
1404 fieldDescriptor, in testInitFromFullyDynamicMessage()
/external/protobuf/src/google/protobuf/compiler/csharp/
Dcsharp_message.cc204 const FieldDescriptor* fieldDescriptor = descriptor_->field(i); in Generate() local
210 "field_name", fieldDescriptor->name(), in Generate()
211 "field_constant_name", GetFieldConstantName(fieldDescriptor), in Generate()
212 "index", StrCat(fieldDescriptor->number())); in Generate()
214 CreateFieldGeneratorInternal(fieldDescriptor)); in Generate()
/external/protobuf/java/compatibility_tests/v2.5.0/tests/src/main/java/com/google/protobuf/test/
DGeneratedMessageTest.java829 FieldDescriptor fieldDescriptor = in testGetFieldBuilder() local
839 Message.Builder fieldBuilder1 = builder1.newBuilderForField(fieldDescriptor) in testGetFieldBuilder()
840 .mergeFrom((Message) builder1.getField(fieldDescriptor)); in testGetFieldBuilder()
844 builder1.setField(fieldDescriptor, fieldBuilder1.build()); in testGetFieldBuilder()
869 Message.Builder fieldBuilder2 = builder2.getFieldBuilder(fieldDescriptor); in testGetFieldBuilder()
873 builder2.setField(fieldDescriptor, fieldBuilder2.build()); in testGetFieldBuilder()
901 FieldDescriptor fieldDescriptor = in testGetFieldBuilderWithInitializedValue() local
907 (NestedMessage.Builder) builder.getFieldBuilder(fieldDescriptor); in testGetFieldBuilderWithInitializedValue()
917 (NestedMessage.Builder) builder.getFieldBuilder(fieldDescriptor); in testGetFieldBuilderWithInitializedValue()
/external/protobuf/objectivec/
DGPBMessage.m2339 GPBFieldDescriptor *fieldDescriptor = fields[startingIndex];
2340 if (GPBFieldTag(fieldDescriptor) == tag) {
2341 GPBFieldType fieldType = fieldDescriptor.fieldType;
2343 MergeSingleFieldFromCodedInputStream(self, fieldDescriptor, syntax,
2349 if (fieldDescriptor.isPackable) {
2351 self, fieldDescriptor, syntax, input);
2357 self, fieldDescriptor, syntax, input, extensionRegistry);
2362 id map = GetOrCreateMapIvarWithField(self, fieldDescriptor, syntax);
2365 field:fieldDescriptor
2381 GPBFieldDescriptor *fieldDescriptor = fields[startingIndex];
[all …]
DGPBDescriptor.m143 GPBFieldDescriptor *fieldDescriptor =
147 [fields addObject:fieldDescriptor];
148 [fieldDescriptor release];
205 for (GPBFieldDescriptor *fieldDescriptor in fields_) {
206 if (fieldDescriptor->description_->flags & GPBFieldTextFormatNameCustom) {
207 objc_setAssociatedObject(fieldDescriptor, &kTextFormatExtraValueKey,
/external/smali/dexlib2/src/main/java/org/jf/dexlib2/writer/pool/
DClassPool.java85 String fieldDescriptor = ReferenceUtil.getShortFieldDescriptor(field); in intern() local
86 if (!fields.add(fieldDescriptor)) { in intern()
88 poolClassDef.getType(), fieldDescriptor); in intern()
/external/protobuf/csharp/src/Google.Protobuf.Test/
DFieldMaskTreeTest.cs175 foreach (var fieldDescriptor in destination.Descriptor.Fields.InFieldNumberOrder()) in Merge()
177 fieldDescriptor.Accessor.Clear(destination); in Merge()
/external/protobuf/src/google/protobuf/compiler/objectivec/
Dobjectivec_message.cc226 const FieldDescriptor* fieldDescriptor = descriptor_->field(i); in DetermineForwardDeclarations() local
227 field_generators_.get(fieldDescriptor) in DetermineForwardDeclarations()
Dobjectivec_helpers.cc564 const Descriptor* fieldDescriptor = descriptor->containing_type(); in OneofEnumName() local
565 string name = ClassName(fieldDescriptor); in OneofEnumName()
/external/emma/core/java12/com/vladium/emma/instr/
DInstrVisitor.java195 final String fieldDescriptor = "[[Z"; in visit() local
211 coverageFieldOffset = cls.addField (COVERAGE_FIELD_NAME, fieldDescriptor, in visit()
216 coverageFieldOffset = cls.addField (COVERAGE_FIELD_NAME, fieldDescriptor, in visit()
328 final String fieldDescriptor = "J"; in visit() local
344 cls.addField (SUID_FIELD_NAME, fieldDescriptor, fieldModifiers, fieldAttributes); in visit()