Public Member Functions | Private Attributes | List of all members
com.google.protobuf.TestUtil.MockBuilderParent Class Reference
Inheritance diagram for com.google.protobuf.TestUtil.MockBuilderParent:
Inheritance graph
[legend]

Public Member Functions

int getInvalidationCount ()
 
int getInvalidationCount ()
 
void markDirty ()
 
void markDirty ()
 

Private Attributes

int invalidations
 

Detailed Description

Mock implementation of GeneratedMessage.BuilderParent for testing.

Author
jonp@.nosp@m.goog.nosp@m.le.co.nosp@m.m (Jon Perlow)

Definition at line 3850 of file bloaty/third_party/protobuf/java/core/src/test/java/com/google/protobuf/TestUtil.java.

Member Function Documentation

◆ getInvalidationCount() [1/2]

int com.google.protobuf.TestUtil.MockBuilderParent.getInvalidationCount ( )
inline

◆ getInvalidationCount() [2/2]

int com.google.protobuf.TestUtil.MockBuilderParent.getInvalidationCount ( )
inline

◆ markDirty() [1/2]

void com.google.protobuf.TestUtil.MockBuilderParent.markDirty ( )
inline

A builder becomes dirty whenever a field is modified – including fields in nested builders – and becomes clean when build() is called. Thus, when a builder becomes dirty, all its parents become dirty as well, and when it becomes clean, all its children become clean. The dirtiness state is used to invalidate certain cached values.

To this end, a builder calls markDirty() on its parent whenever it transitions from clean to dirty. The parent must propagate this call to its own parent, unless it was already dirty, in which case the grandparent must necessarily already be dirty as well. The parent can only transition back to "clean" after calling build() on all children.

Implements com.google.protobuf.AbstractMessage.BuilderParent.

Definition at line 3855 of file bloaty/third_party/protobuf/java/core/src/test/java/com/google/protobuf/TestUtil.java.

◆ markDirty() [2/2]

void com.google.protobuf.TestUtil.MockBuilderParent.markDirty ( )
inline

A builder becomes dirty whenever a field is modified – including fields in nested builders – and becomes clean when build() is called. Thus, when a builder becomes dirty, all its parents become dirty as well, and when it becomes clean, all its children become clean. The dirtiness state is used to invalidate certain cached values.

To this end, a builder calls markDirty() on its parent whenever it transitions from clean to dirty. The parent must propagate this call to its own parent, unless it was already dirty, in which case the grandparent must necessarily already be dirty as well. The parent can only transition back to "clean" after calling build() on all children.

Implements com.google.protobuf.AbstractMessage.BuilderParent.

Definition at line 3867 of file protobuf/java/core/src/test/java/com/google/protobuf/TestUtil.java.

Member Data Documentation

◆ invalidations

int com.google.protobuf.TestUtil.MockBuilderParent.invalidations
private

The documentation for this class was generated from the following file:


grpc
Author(s):
autogenerated on Fri May 16 2025 03:03:07