Package com.google.protobuf
Class LazyField
java.lang.Object
com.google.protobuf.LazyFieldLite
com.google.protobuf.LazyField
LazyField encapsulates the logic of lazily parsing message fields. It stores the message in a
ByteString initially and then parses it on-demand.
Most methods are implemented in LazyFieldLite but this class can contain a
default instance of the message to provide hashCode(), equals(), and
toString().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static classLazyEntry and LazyIterator are used to encapsulate the LazyField, when users iterate all fields from FieldSet.(package private) static class -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final MessageLiteCarry a message's default instance which is used byhashCode(),equals(), andtoString().Fields inherited from class com.google.protobuf.LazyFieldLite
value -
Constructor Summary
ConstructorsConstructorDescriptionLazyField(MessageLite defaultInstance, ExtensionRegistryLite extensionRegistry, ByteString bytes) -
Method Summary
Methods inherited from class com.google.protobuf.LazyFieldLite
clear, ensureInitialized, fromValue, getSerializedSize, getValue, merge, mergeFrom, set, setByteString, setValue, toByteString, writeTo
-
Field Details
-
defaultInstance
Carry a message's default instance which is used byhashCode(),equals(), andtoString().
-
-
Constructor Details
-
LazyField
public LazyField(MessageLite defaultInstance, ExtensionRegistryLite extensionRegistry, ByteString bytes)
-
-
Method Details
-
containsDefaultInstance
public boolean containsDefaultInstance()Description copied from class:LazyFieldLiteDetermines whether this LazyFieldLite instance represents the default instance of this type.- Overrides:
containsDefaultInstancein classLazyFieldLite
-
getValue
-
hashCode
public int hashCode()- Overrides:
hashCodein classLazyFieldLite
-
equals
- Overrides:
equalsin classLazyFieldLite
-
toString
-