|
static FieldMask | fromFieldNumbers (Class<? extends Message > type, int... fieldNumbers) |
|
static FieldMask | fromFieldNumbers (Class<? extends Message > type, Iterable< Integer > fieldNumbers) |
|
static FieldMask | fromJsonString (String value) |
|
static FieldMask | fromString (Class<? extends Message > type, String value) |
|
static FieldMask | fromString (String value) |
|
static FieldMask | fromStringList (Class<? extends Message > type, Iterable< String > paths) |
|
static FieldMask | intersection (FieldMask mask1, FieldMask mask2) |
|
static boolean | isValid (Class<? extends Message > type, FieldMask fieldMask) |
|
static boolean | isValid (Class<? extends Message > type, String path) |
|
static boolean | isValid (Descriptor descriptor, FieldMask fieldMask) |
|
static boolean | isValid (Descriptor descriptor, String path) |
|
static void | merge (FieldMask mask, Message source, Message.Builder destination) |
|
static void | merge (FieldMask mask, Message source, Message.Builder destination, MergeOptions options) |
|
static FieldMask | normalize (FieldMask mask) |
|
static String | toJsonString (FieldMask fieldMask) |
|
static String | toString (FieldMask fieldMask) |
|
static FieldMask | union (FieldMask firstMask, FieldMask secondMask, FieldMask... otherMasks) |
|
Utility helper functions to work with com.google.protobuf.FieldMask.
Definition at line 52 of file FieldMaskUtil.java.
◆ FieldMaskUtil()
com.google.protobuf.util.FieldMaskUtil.FieldMaskUtil |
( |
| ) |
|
|
inlineprivate |
◆ fromFieldNumbers() [1/2]
static FieldMask com.google.protobuf.util.FieldMaskUtil.fromFieldNumbers |
( |
Class<? extends Message > |
type, |
|
|
int... |
fieldNumbers |
|
) |
| |
|
inlinestatic |
Constructs a FieldMask from the passed field numbers.
- Exceptions
-
IllegalArgumentException | if any of the fields are invalid for the message. |
Definition at line 125 of file FieldMaskUtil.java.
◆ fromFieldNumbers() [2/2]
static FieldMask com.google.protobuf.util.FieldMaskUtil.fromFieldNumbers |
( |
Class<? extends Message > |
type, |
|
|
Iterable< Integer > |
fieldNumbers |
|
) |
| |
|
inlinestatic |
Constructs a FieldMask from the passed field numbers.
- Exceptions
-
IllegalArgumentException | if any of the fields are invalid for the message. |
Definition at line 134 of file FieldMaskUtil.java.
◆ fromJsonString()
static FieldMask com.google.protobuf.util.FieldMaskUtil.fromJsonString |
( |
String |
value | ) |
|
|
inlinestatic |
Converts a field mask from a Proto3 JSON string, that is splitting the paths along commas and converting from camel case to snake case.
Definition at line 168 of file FieldMaskUtil.java.
◆ fromString() [1/2]
static FieldMask com.google.protobuf.util.FieldMaskUtil.fromString |
( |
Class<? extends Message > |
type, |
|
|
String |
value |
|
) |
| |
|
inlinestatic |
Parses from a string to a FieldMask and validates all field paths.
- Exceptions
-
IllegalArgumentException | if any of the field path is invalid. |
Definition at line 94 of file FieldMaskUtil.java.
◆ fromString() [2/2]
static FieldMask com.google.protobuf.util.FieldMaskUtil.fromString |
( |
String |
value | ) |
|
|
inlinestatic |
◆ fromStringList()
static FieldMask com.google.protobuf.util.FieldMaskUtil.fromStringList |
( |
Class<? extends Message > |
type, |
|
|
Iterable< String > |
paths |
|
) |
| |
|
inlinestatic |
Constructs a FieldMask for a list of field paths in a certain type.
- Exceptions
-
IllegalArgumentException | if any of the field path is not valid. |
Definition at line 105 of file FieldMaskUtil.java.
◆ intersection()
◆ isValid() [1/4]
static boolean com.google.protobuf.util.FieldMaskUtil.isValid |
( |
Class<? extends Message > |
type, |
|
|
FieldMask |
fieldMask |
|
) |
| |
|
inlinestatic |
Checks whether paths in a given fields mask are valid.
Definition at line 183 of file FieldMaskUtil.java.
◆ isValid() [2/4]
static boolean com.google.protobuf.util.FieldMaskUtil.isValid |
( |
Class<? extends Message > |
type, |
|
|
String |
path |
|
) |
| |
|
inlinestatic |
◆ isValid() [3/4]
static boolean com.google.protobuf.util.FieldMaskUtil.isValid |
( |
Descriptor |
descriptor, |
|
|
FieldMask |
fieldMask |
|
) |
| |
|
inlinestatic |
Checks whether paths in a given fields mask are valid.
Definition at line 192 of file FieldMaskUtil.java.
◆ isValid() [4/4]
static boolean com.google.protobuf.util.FieldMaskUtil.isValid |
( |
Descriptor |
descriptor, |
|
|
String |
path |
|
) |
| |
|
inlinestatic |
Checks whether paths in a given fields mask are valid.
Definition at line 213 of file FieldMaskUtil.java.
◆ merge() [1/2]
◆ merge() [2/2]
Merges fields specified by a FieldMask from one message to another with the specified merge options.
Definition at line 351 of file FieldMaskUtil.java.
◆ normalize()
Converts a FieldMask to its canonical form. In the canonical form of a FieldMask, all field paths are sorted alphabetically and redundant field paths are removed.
Definition at line 240 of file FieldMaskUtil.java.
◆ toJsonString()
static String com.google.protobuf.util.FieldMaskUtil.toJsonString |
( |
FieldMask |
fieldMask | ) |
|
|
inlinestatic |
Converts a field mask to a Proto3 JSON string, that is converting from snake case to camel case and joining all paths into one string with commas.
Definition at line 153 of file FieldMaskUtil.java.
◆ toString()
static String com.google.protobuf.util.FieldMaskUtil.toString |
( |
FieldMask |
fieldMask | ) |
|
|
inlinestatic |
◆ union()
◆ FIELD_PATH_SEPARATOR
final String com.google.protobuf.util.FieldMaskUtil.FIELD_PATH_SEPARATOR = "," |
|
staticprivate |
◆ FIELD_PATH_SEPARATOR_REGEX
final String com.google.protobuf.util.FieldMaskUtil.FIELD_PATH_SEPARATOR_REGEX = "," |
|
staticprivate |
◆ FIELD_SEPARATOR_REGEX
final String com.google.protobuf.util.FieldMaskUtil.FIELD_SEPARATOR_REGEX = "\\." |
|
staticprivate |
The documentation for this class was generated from the following file: