Package com.google.protobuf.util
Enum JsonFormat.ShouldPrintDefaults
- java.lang.Object
-
- java.lang.Enum<JsonFormat.ShouldPrintDefaults>
-
- com.google.protobuf.util.JsonFormat.ShouldPrintDefaults
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<JsonFormat.ShouldPrintDefaults>
- Enclosing class:
- JsonFormat
private static enum JsonFormat.ShouldPrintDefaults extends java.lang.Enum<JsonFormat.ShouldPrintDefaults>
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ALWAYS_PRINT_EXCEPT_MESSAGES_AND_ONEOFS
ALWAYS_PRINT_SPECIFIED_FIELDS
ALWAYS_PRINT_WITHOUT_PRESENCE_FIELDS
ONLY_IF_PRESENT
-
Constructor Summary
Constructors Modifier Constructor Description private
ShouldPrintDefaults()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static JsonFormat.ShouldPrintDefaults
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static JsonFormat.ShouldPrintDefaults[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
ONLY_IF_PRESENT
public static final JsonFormat.ShouldPrintDefaults ONLY_IF_PRESENT
-
ALWAYS_PRINT_EXCEPT_MESSAGES_AND_ONEOFS
public static final JsonFormat.ShouldPrintDefaults ALWAYS_PRINT_EXCEPT_MESSAGES_AND_ONEOFS
-
ALWAYS_PRINT_WITHOUT_PRESENCE_FIELDS
public static final JsonFormat.ShouldPrintDefaults ALWAYS_PRINT_WITHOUT_PRESENCE_FIELDS
-
ALWAYS_PRINT_SPECIFIED_FIELDS
public static final JsonFormat.ShouldPrintDefaults ALWAYS_PRINT_SPECIFIED_FIELDS
-
-
Method Detail
-
values
public static JsonFormat.ShouldPrintDefaults[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (JsonFormat.ShouldPrintDefaults c : JsonFormat.ShouldPrintDefaults.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static JsonFormat.ShouldPrintDefaults valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
-