Interface MessageLiteOrBuilder (3.19.4)

public interface MessageLiteOrBuilder

Base interface for methods common to MessageLite and MessageLite.Builder to provide type equivalency.

Methods

getDefaultInstanceForType()

public abstract MessageLite getDefaultInstanceForType()

Get an instance of the type with no fields set. Because no fields are set, all getters for singular fields will return default values and repeated fields will appear empty. This may or may not be a singleton. This differs from the getDefaultInstance() method of generated message classes in that this method is an abstract method of the MessageLite interface whereas getDefaultInstance() is a static method of a specific class. They return the same thing.

Returns
TypeDescription
MessageLite

isInitialized()

public abstract boolean isInitialized()

Returns true if all required fields in the message and all embedded messages are set, false otherwise.

See also: MessageOrBuilder#getInitializationErrorString()

Returns
TypeDescription
boolean