Package com.squareup.protoparser
Class MessageType.Field
- java.lang.Object
-
- com.squareup.protoparser.MessageType.Field
-
- Enclosing class:
- MessageType
public static final class MessageType.Field extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.Stringdocumentationprivate MessageType.Labellabelprivate java.lang.Stringnameprivate java.util.List<Option>optionsprivate inttagprivate java.lang.Stringtype
-
Constructor Summary
Constructors Constructor Description Field(MessageType.Label label, java.lang.String type, java.lang.String name, int tag, java.lang.String documentation, java.util.List<Option> options)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object other)java.lang.StringgetDefault()Returns thedefaultoption value ornull.java.lang.StringgetDocumentation()MessageType.LabelgetLabel()java.lang.StringgetName()java.util.List<Option>getOptions()intgetTag()java.lang.StringgetType()Returns the type of this field.inthashCode()booleanisDeprecated()Returns true when thedeprecatedoption is present and set to true.booleanisPacked()Returns true when thepackedoption is present and set to true.java.lang.StringtoString()
-
-
-
Field Detail
-
label
private final MessageType.Label label
-
type
private final java.lang.String type
-
name
private final java.lang.String name
-
tag
private final int tag
-
options
private final java.util.List<Option> options
-
documentation
private final java.lang.String documentation
-
-
Constructor Detail
-
Field
public Field(MessageType.Label label, java.lang.String type, java.lang.String name, int tag, java.lang.String documentation, java.util.List<Option> options)
-
-
Method Detail
-
getLabel
public MessageType.Label getLabel()
-
getType
public java.lang.String getType()
Returns the type of this field. May be a message type name, an enum type name, or a scalar value type likeint64orbytes.
-
getName
public java.lang.String getName()
-
getTag
public int getTag()
-
getOptions
public java.util.List<Option> getOptions()
-
getDocumentation
public java.lang.String getDocumentation()
-
isDeprecated
public boolean isDeprecated()
Returns true when thedeprecatedoption is present and set to true.
-
isPacked
public boolean isPacked()
Returns true when thepackedoption is present and set to true.
-
getDefault
public java.lang.String getDefault()
Returns thedefaultoption value ornull.
-
equals
public boolean equals(java.lang.Object other)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-