public class Message extends AbstractUserTypeContainer implements UserType, UserTypeContainer, FieldContainer, GroupContainer
| Modifier and Type | Field and Description |
|---|---|
protected List<Range> |
extensionRanges |
protected List<Field> |
fields |
protected String |
fullyQualifiedName |
protected List<Group> |
groups |
protected List<Oneof> |
oneofs |
protected Proto |
proto |
protected List<String> |
reservedFieldNames |
protected List<Range> |
reservedFieldRanges |
declaredExtensions, enums, messages, parentname, optionscomments, sourceCodeLocation| Constructor and Description |
|---|
Message(UserTypeContainer parent) |
| Modifier and Type | Method and Description |
|---|---|
void |
addExtensionRange(Range range) |
void |
addField(Field field) |
void |
addGroup(Group group) |
void |
addOneof(Oneof oneof) |
void |
addReservedFieldName(String name) |
void |
addReservedFieldRange(Range range) |
String |
getCanonicalName()
Returns
FieldType.getFullyQualifiedName() without leading dot. |
DescriptorType |
getDescriptorType() |
List<Range> |
getExtensionRanges() |
Field |
getField(int tag) |
Field |
getField(String name) |
int |
getFieldCount() |
List<Field> |
getFields()
Returns all fields in this message, including group fields and oneof fields.
|
String |
getFullyQualifiedName()
Returns fully qualified name for this user type.
|
List<Group> |
getGroups() |
String |
getNamespace()
Returns string prefix that is common for all children full names.
|
Oneof |
getOneof(String name) |
List<Oneof> |
getOneofs() |
Proto |
getProto() |
List<String> |
getReservedFieldNames() |
List<Range> |
getReservedFieldRanges() |
boolean |
isEnum()
Test if this type is enum.
|
boolean |
isMap()
Test if this type is map.
|
boolean |
isMapEntry() |
boolean |
isMessage()
Test if this type is message.
|
boolean |
isNested()
Test if this type is nested (declared inside of other message).
|
boolean |
isScalar()
Test if this type is scalar.
|
void |
setExtensionRanges(List<Range> extensionRanges) |
void |
setFields(List<Field> fields) |
void |
setFullyQualifiedName(String fullyQualifiedName) |
void |
setGroups(List<Group> groups) |
void |
setOneofs(List<Oneof> oneofs) |
void |
setProto(Proto proto) |
void |
setReservedFieldNames(List<String> reservedFieldNames) |
void |
setReservedFieldRanges(List<Range> reservedFieldRanges) |
String |
toString() |
addDeclaredExtension, addEnum, addMessage, getDeclaredExtensions, getEnums, getMessages, getParent, setEnumsgetName, getOptions, setNameaddComment, getCommentLines, getComments, getSourceCodeLocation, setComments, setSourceCodeLocationclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetOptionsgetCommentLines, getComments, getSourceCodeLocationaddMessage, getMessage, getMessagesaddEnum, getEnum, getEnumsaddDeclaredExtension, getDeclaredExtensionspublic Message(UserTypeContainer parent)
public DescriptorType getDescriptorType()
getDescriptorType in interface Descriptorpublic List<Field> getFields()
getFields in interface FieldContainerpublic void setFields(List<Field> fields)
setFields in interface FieldContainerpublic void addField(Field field)
addField in interface FieldContainerpublic Field getField(String name)
getField in interface FieldContainerpublic Field getField(int tag)
getField in interface FieldContainerpublic void addOneof(Oneof oneof)
public String getFullyQualifiedName()
UserTypegetFullyQualifiedName in interface FieldTypegetFullyQualifiedName in interface TypegetFullyQualifiedName in interface UserTypepublic String getCanonicalName()
FieldTypeFieldType.getFullyQualifiedName() without leading dot.getCanonicalName in interface FieldTypegetCanonicalName in interface Typepublic void setFullyQualifiedName(String fullyQualifiedName)
setFullyQualifiedName in interface UserTypepublic boolean isNested()
UserTypepublic boolean isScalar()
FieldTypepublic boolean isEnum()
FieldTypepublic boolean isMessage()
FieldTypepublic boolean isMap()
FieldTypepublic String getNamespace()
UserTypeContainergetNamespace in interface UserTypeContainerpublic List<Group> getGroups()
getGroups in interface GroupContainerpublic void setGroups(List<Group> groups)
setGroups in interface GroupContainerpublic void addGroup(Group group)
addGroup in interface GroupContainerpublic void addExtensionRange(Range range)
public void addReservedFieldRange(Range range)
public void addReservedFieldName(String name)
public int getFieldCount()
getFieldCount in interface FieldContainerpublic boolean isMapEntry()
Copyright © 2015–2017. All rights reserved.