Class InternalLazyField

java.lang.Object
com.google.protobuf.InternalLazyField

class InternalLazyField extends Object
InternalLazyField encapsulates the logic of lazily parsing message fields. It stores the message in a ByteString initially and then parses it on-demand.

The invariants of InternalLazyField are that 1) once value or bytes is set, they will not be changed; 2) value and bytes cannot be null at the same time; 3) If corrupted is true, value must be null.

  • Field Details

    • defaultInstance

      private final MessageLite defaultInstance
    • extensionRegistry

      private final ExtensionRegistryLite extensionRegistry
    • bytes

      private volatile ByteString bytes
    • value

      protected volatile MessageLite value
    • corrupted

      private volatile boolean corrupted
  • Constructor Details

    • InternalLazyField

      InternalLazyField(MessageLite defaultInstance, ExtensionRegistryLite extensionRegistry, ByteString bytes)
      Constructor for InternalLazyField. All arguments cannot be null.
    • InternalLazyField

      InternalLazyField(MessageLite message)
      Constructor for InternalLazyField that takes in a message value. The argument cannot be null.
  • Method Details