public abstract class MessageContext<E extends MessageContext> extends Object
Modifier and Type | Field and Description |
---|---|
protected Map<String,com.google.protobuf.Descriptors.FieldDescriptor> |
fieldDescriptors
The map of field descriptors by name, for easier lookup (more efficient than Descriptors.Descriptor.findFieldByName()).
|
protected com.google.protobuf.Descriptors.Descriptor |
messageDescriptor
The descriptor of the current message.
|
protected E |
parentContext
The context of the outer message or null if this is a top level message.
|
protected Set<Integer> |
seenFields |
Modifier | Constructor and Description |
---|---|
protected |
MessageContext(E parentContext,
String fieldName,
com.google.protobuf.Descriptors.Descriptor messageDescriptor) |
Modifier and Type | Method and Description |
---|---|
com.google.protobuf.Descriptors.FieldDescriptor |
getFieldByName(String fieldName) |
com.google.protobuf.Descriptors.FieldDescriptor |
getFieldByNumber(int fieldNumber) |
Map<String,com.google.protobuf.Descriptors.FieldDescriptor> |
getFieldDescriptors() |
String |
getFieldName()
Gets the name of the nested field.
|
String |
getFullFieldName() |
com.google.protobuf.Descriptors.Descriptor |
getMessageDescriptor() |
E |
getParentContext() |
Set<Integer> |
getSeenFields() |
protected final E extends MessageContext parentContext
protected final com.google.protobuf.Descriptors.Descriptor messageDescriptor
protected final Map<String,com.google.protobuf.Descriptors.FieldDescriptor> fieldDescriptors
public E getParentContext()
public String getFieldName()
null
if this is the root contextpublic String getFullFieldName()
public com.google.protobuf.Descriptors.Descriptor getMessageDescriptor()
public Map<String,com.google.protobuf.Descriptors.FieldDescriptor> getFieldDescriptors()
public com.google.protobuf.Descriptors.FieldDescriptor getFieldByName(String fieldName)
public com.google.protobuf.Descriptors.FieldDescriptor getFieldByNumber(int fieldNumber)
Copyright © 2017 JBoss, a division of Red Hat. All rights reserved.