Package com.google.protobuf
Class GeneratedMessageV3.Builder.BuilderParentImpl
- java.lang.Object
-
- com.google.protobuf.GeneratedMessageV3.Builder.BuilderParentImpl
-
- All Implemented Interfaces:
AbstractMessage.BuilderParent
,GeneratedMessageV3.BuilderParent
- Enclosing class:
- GeneratedMessageV3.Builder<BuilderType extends GeneratedMessageV3.Builder<BuilderType>>
private class GeneratedMessageV3.Builder.BuilderParentImpl extends java.lang.Object implements GeneratedMessageV3.BuilderParent
Implementation ofGeneratedMessageV3.BuilderParent
for giving to our children. This small inner class makes it so we don't publicly expose the BuilderParent methods.
-
-
Constructor Summary
Constructors Modifier Constructor Description private
BuilderParentImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
markDirty()
A builder becomes dirty whenever a field is modified -- including fields in nested builders -- and becomes clean when build() is called.
-
-
-
Method Detail
-
markDirty
public void markDirty()
Description copied from interface:AbstractMessage.BuilderParent
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.
- Specified by:
markDirty
in interfaceAbstractMessage.BuilderParent
-
-