DynamicMessage, and also to represent extensions in GeneratedMessage.
This class is package-private, since outside users should probably be using DynamicMessage.
| Modifier and Type | Class and Description |
|---|---|
| public static interface | FieldSet.FieldDescriptorLite<T extends FieldSet.
Interface for a FieldDescriptor or lite extension descriptor. |
| Modifier and Type | Field and Description |
|---|---|
| private static final FieldSet | |
| private final SmallSortedMap | |
| private boolean | |
| private boolean |
| Access | Constructor and Description |
|---|---|
| private | |
| private |
| Modifier and Type | Method and Description |
|---|---|
| public void | addRepeatedField(final FieldDescriptorType descriptor, final Object value)
Useful for implementing |
| public void | |
| public void | clearField(final FieldDescriptorType descriptor)
Useful for implementing |
| public FieldSet | |
| private void | |
| private Object | |
| pack-priv static int | computeElementSize(final WireFormat.
The field's type. type,The field's number. number, final Object Object representing the field's value. Must be of the exact type which would be
returned by value)Message#getField(Descriptors. for this field.Compute the number of bytes that would be needed to encode a single tag/value pair of arbitrary type. |
| pack-priv static int | computeElementSizeNoTag(final WireFormat.
The field's type. type,Object representing the field's value. Must be of the exact type which would be
returned by value)Message#getField(Descriptors. for this field.Compute the number of bytes that would be needed to encode a particular value of arbitrary type, excluding tag. |
| public static int | computeFieldSize(final FieldSet.
Compute the number of bytes needed to encode a particular field. |
| public static <T extends FieldSet. | |
| public boolean | equals(Object
the reference object with which to compare. o)Overrides java. |
| public Map | |
| public Object | getField(final FieldDescriptorType descriptor)
Useful for implementing |
| public int | |
| private int | |
| public Object | getRepeatedField(final FieldDescriptorType descriptor, final int index)
Useful for implementing |
| public int | getRepeatedFieldCount(final FieldDescriptorType descriptor)
Useful for implementing |
| public int | |
| pack-priv static int | getWireFormatForFieldType(final WireFormat.
Given a field type, return the wire type. |
| public boolean | hasField(final FieldDescriptorType descriptor)
Useful for implementing |
| public int | |
| pack-priv boolean | |
| public boolean | |
| public boolean | |
| private boolean | |
| public Iterator | |
| public void | |
| public void | mergeFrom(final FieldSet<FieldDescriptorType> other)
Like |
| private void | |
| public static <T extends FieldSet. | |
| public static Object | Returns: An object representing the field's value, of the exact type which would be returned byMessage#getField(Descriptors. for this field.The stream from which to read. input, final WireFormat.Declared type of the field. type,When true, check that the input is valid utf8. checkUtf8)Read a field of any primitive type for immutable messages from a CodedInputStream. |
| public void | setField(final FieldDescriptorType descriptor, Object value)
Useful for implementing |
| public void | setRepeatedField(final FieldDescriptorType descriptor, final int index, final Object value)
Useful for implementing |
| private static void | verifyType(final WireFormat.
Verifies that the given object is of the correct type to be a valid value for the given field. |
| pack-priv static void | writeElement(final CodedOutputStream
The output stream. output, final WireFormat.The field's type. type,The field's number. number, final Object Object representing the field's value. Must be of the exact type which would be
returned by value)Message#getField(Descriptors. for this field.Write a single tag-value pair to the stream. |
| pack-priv static void | writeElementNoTag(final CodedOutputStream
The output stream. output, final WireFormat.The field's type. type,Object representing the field's value. Must be of the exact type which would be
returned by value)Message#getField(Descriptors. for this field.Write a field of arbitrary type, without its tag, to the stream. |
| public static void | writeField(final FieldSet.
Write a single field. |
| public void | |
| private void | writeMessageSetTo(final Map.
|
| public void |
| DEFAULT_INSTANCE | back to summary |
|---|---|
private static final FieldSet<FieldDescriptorType extends FieldSet.
| |
| fields | back to summary |
|---|---|
| private final SmallSortedMap<FieldDescriptorType, Object> fields | |
| hasLazyField | back to summary |
|---|---|
| private boolean hasLazyField | |
| isImmutable | back to summary |
|---|---|
| private boolean isImmutable | |
| FieldSet | back to summary |
|---|---|
| private FieldSet() Construct a new FieldSet. | |
| FieldSet | back to summary |
|---|---|
| private FieldSet(final boolean dummy) Construct an empty FieldSet. This is only used to initialize DEFAULT_INSTANCE. | |
| addRepeatedField | back to summary |
|---|---|
| public void addRepeatedField(final FieldDescriptorType descriptor, final Object value) Useful for implementing
| |
| clear | back to summary |
|---|---|
| public void clear() | |
| clearField | back to summary |
|---|---|
| public void clearField(final FieldDescriptorType descriptor) Useful for implementing | |
| clone | back to summary |
|---|---|
| public FieldSet Overrides java. Clones the FieldSet. The returned FieldSet will be mutable even if the original FieldSet was immutable. | |
| cloneFieldEntry | back to summary |
|---|---|
| private void cloneFieldEntry(Map<FieldDescriptorType, Object> map, Map. | |
| cloneIfMutable | back to summary |
|---|---|
| private Object cloneIfMutable(Object value) | |
| computeElementSize | back to summary |
|---|---|
| pack-priv static int computeElementSize(final WireFormat. Compute the number of bytes that would be needed to encode a single tag/value pair of arbitrary type.
| |
| computeElementSizeNoTag | back to summary |
|---|---|
| pack-priv static int computeElementSizeNoTag(final WireFormat. Compute the number of bytes that would be needed to encode a particular value of arbitrary type, excluding tag.
| |
| computeFieldSize | back to summary |
|---|---|
| public static int computeFieldSize(final FieldSet. Compute the number of bytes needed to encode a particular field. | |
| emptySet | back to summary |
|---|---|
| public static <T extends FieldSet. Get an immutable empty FieldSet.
| |
| equals | back to summary |
|---|---|
| public boolean equals(Object o) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes. | |
| getAllFields | back to summary |
|---|---|
| public Map Get a simple map containing all the fields. | |
| getField | back to summary |
|---|---|
| public Object getField(final FieldDescriptorType descriptor) Useful for implementing | |
| getMessageSetSerializedSize | back to summary |
|---|---|
| public int getMessageSetSerializedSize() Like | |
| getMessageSetSerializedSize | back to summary |
|---|---|
| private int getMessageSetSerializedSize(final Map. | |
| getRepeatedField | back to summary |
|---|---|
| public Object getRepeatedField(final FieldDescriptorType descriptor, final int index) Useful for implementing | |
| getRepeatedFieldCount | back to summary |
|---|---|
| public int getRepeatedFieldCount(final FieldDescriptorType descriptor) Useful for implementing | |
| getSerializedSize | back to summary |
|---|---|
| public int getSerializedSize() See | |
| getWireFormatForFieldType | back to summary |
|---|---|
| pack-priv static int getWireFormatForFieldType(final WireFormat. Given a field type, return the wire type.
| |
| hasField | back to summary |
|---|---|
| public boolean hasField(final FieldDescriptorType descriptor) Useful for implementing | |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for the object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| isEmpty | back to summary |
|---|---|
| pack-priv boolean isEmpty() Returns | |
| isImmutable | back to summary |
|---|---|
| public boolean isImmutable() Returns whether the FieldSet is immutable. This is true if it is the
| |
| isInitialized | back to summary |
|---|---|
| public boolean isInitialized() Note Since | |
| isInitialized | back to summary |
|---|---|
private boolean isInitialized(final Map.
| |
| iterator | back to summary |
|---|---|
| public Iterator Get an iterator to the field map. This iterator should not be leaked out of the protobuf library as it is not protected from mutation when fields is not immutable. | |
| makeImmutable | back to summary |
|---|---|
| public void makeImmutable() Make this FieldSet immutable from this point forward.
| |
| mergeFrom | back to summary |
|---|---|
| public void mergeFrom(final FieldSet<FieldDescriptorType> other) Like | |
| mergeFromField | back to summary |
|---|---|
private void mergeFromField(final Map.
| |
| newFieldSet | back to summary |
|---|---|
| public static <T extends FieldSet. Construct a new FieldSet. | |
| readPrimitiveField | back to summary |
|---|---|
| public static Object readPrimitiveField(CodedInputStream input, final WireFormat. Read a field of any primitive type for immutable messages from a CodedInputStream. Enums, groups, and embedded messages are not handled by this method.
| |
| setField | back to summary |
|---|---|
| public void setField(final FieldDescriptorType descriptor, Object value) Useful for implementing
| |
| setRepeatedField | back to summary |
|---|---|
| public void setRepeatedField(final FieldDescriptorType descriptor, final int index, final Object value) Useful for implementing
| |
| verifyType | back to summary |
|---|---|
| private static void verifyType(final WireFormat. Verifies that the given object is of the correct type to be a valid value for the given field. (For repeated fields, this checks if the object is the right type to be one element of the field.)
| |
| writeElement | back to summary |
|---|---|
| pack-priv static void writeElement(final CodedOutputStream output, final WireFormat. Write a single tag-value pair to the stream.
| |
| writeElementNoTag | back to summary |
|---|---|
| pack-priv static void writeElementNoTag(final CodedOutputStream output, final WireFormat. Write a field of arbitrary type, without its tag, to the stream.
| |
| writeField | back to summary |
|---|---|
| public static void writeField(final FieldSet. Write a single field. | |
| writeMessageSetTo | back to summary |
|---|---|
| public void writeMessageSetTo(final CodedOutputStream output) throws IOException Like | |
| writeMessageSetTo | back to summary |
|---|---|
| private void writeMessageSetTo(final Map. | |
| writeTo | back to summary |
|---|---|
| public void writeTo(final CodedOutputStream output) throws IOException | |
Descriptors.FieldDescriptor .
| Modifier and Type | Method and Description |
|---|---|
| public Internal. | |
| public WireFormat. | |
| public WireFormat. | |
| public int | |
| public MessageLite. | |
| public boolean | |
| public boolean |
| getEnumType | back to summary |
|---|---|
| public Internal. | |
| getLiteJavaType | back to summary |
|---|---|
| public WireFormat. | |
| getLiteType | back to summary |
|---|---|
| public WireFormat. | |
| getNumber | back to summary |
|---|---|
| public int getNumber() | |
| internalMergeFrom | back to summary |
|---|---|
| public MessageLite. | |
| isPacked | back to summary |
|---|---|
| public boolean isPacked() | |
| isRepeated | back to summary |
|---|---|
| public boolean isRepeated() | |