Package com.google.protobuf
Class LazyField
- java.lang.Object
-
- com.google.protobuf.LazyFieldLite
-
- com.google.protobuf.LazyField
-
public class LazyField extends LazyFieldLite
LazyField encapsulates the logic of lazily parsing message fields. It stores the message in a ByteString initially and then parse it on-demand. Most of key methods are implemented inLazyFieldLite
but this class can contain default instance of the message to providehashCode()
,euqals()
andtoString()
.- Author:
- xiangl@google.com (Xiang Li)
-
-
Field Summary
-
Fields inherited from class com.google.protobuf.LazyFieldLite
value
-
-
Constructor Summary
Constructors Constructor Description LazyField(MessageLite defaultInstance, ExtensionRegistryLite extensionRegistry, ByteString bytes)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
containsDefaultInstance()
boolean
equals(java.lang.Object obj)
MessageLite
getValue()
int
hashCode()
java.lang.String
toString()
-
Methods inherited from class com.google.protobuf.LazyFieldLite
clear, ensureInitialized, fromValue, getExtensionRegistry, getSerializedSize, getValue, merge, setByteString, setValue, toByteString
-
-
-
-
Constructor Detail
-
LazyField
public LazyField(MessageLite defaultInstance, ExtensionRegistryLite extensionRegistry, ByteString bytes)
-
-
Method Detail
-
containsDefaultInstance
public boolean containsDefaultInstance()
- Overrides:
containsDefaultInstance
in classLazyFieldLite
-
getValue
public MessageLite getValue()
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-