public class LazyField extends LazyFieldLite
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()
.
Constructors
LazyField(MessageLite defaultInstance, ExtensionRegistryLite extensionRegistry, ByteString bytes)
public LazyField(MessageLite defaultInstance, ExtensionRegistryLite extensionRegistry, ByteString bytes)
Parameters | |
---|---|
Name | Description |
defaultInstance | MessageLite |
extensionRegistry | ExtensionRegistryLite |
bytes | ByteString |
Methods
containsDefaultInstance()
public boolean containsDefaultInstance()
Determines whether this LazyFieldLite instance represents the default instance of this type.
Returns | |
---|---|
Type | Description |
boolean |
equals(Object obj)
public boolean equals(Object obj)
Parameter | |
---|---|
Name | Description |
obj | Object |
Returns | |
---|---|
Type | Description |
boolean |
getValue()
public MessageLite getValue()
Returns | |
---|---|
Type | Description |
MessageLite |
hashCode()
public int hashCode()
Returns | |
---|---|
Type | Description |
int |
toString()
public String toString()
Returns | |
---|---|
Type | Description |
String |