public static class JsonFormat.Value extends Object implements JacksonAnnotationValue<JsonFormat>, Serializable
JsonFormat
annotation.Constructor and Description |
---|
Value() |
Value(JsonFormat ann) |
Value(String p,
JsonFormat.Shape sh,
Locale l,
String tzStr,
TimeZone tz,
JsonFormat.Features f)
Deprecated.
|
Value(String p,
JsonFormat.Shape sh,
Locale l,
String tzStr,
TimeZone tz,
JsonFormat.Features f,
Boolean lenient) |
Value(String p,
JsonFormat.Shape sh,
Locale l,
TimeZone tz,
JsonFormat.Features f)
Deprecated.
|
Value(String p,
JsonFormat.Shape sh,
Locale l,
TimeZone tz,
JsonFormat.Features f,
Boolean lenient) |
Value(String p,
JsonFormat.Shape sh,
String localeStr,
String tzStr,
JsonFormat.Features f)
Deprecated.
|
Value(String p,
JsonFormat.Shape sh,
String localeStr,
String tzStr,
JsonFormat.Features f,
Boolean lenient) |
Modifier and Type | Method and Description |
---|---|
static JsonFormat.Value |
empty() |
boolean |
equals(Object o) |
static JsonFormat.Value |
forLeniency(boolean lenient) |
static JsonFormat.Value |
forPattern(String p) |
static JsonFormat.Value |
forShape(JsonFormat.Shape sh) |
static JsonFormat.Value |
from(JsonFormat ann) |
Boolean |
getFeature(JsonFormat.Feature f)
Accessor for checking whether this format value has specific setting for
given feature.
|
JsonFormat.Features |
getFeatures()
Accessor for getting full set of features enabled/disabled.
|
Boolean |
getLenient() |
Locale |
getLocale() |
String |
getPattern() |
JsonFormat.Shape |
getShape() |
TimeZone |
getTimeZone() |
int |
hashCode() |
boolean |
hasLenient()
Accessor for checking whether there is a setting for leniency.
|
boolean |
hasLocale() |
boolean |
hasPattern() |
boolean |
hasShape() |
boolean |
hasTimeZone() |
boolean |
isLenient()
Convenience method equivalent to
|
static JsonFormat.Value |
merge(JsonFormat.Value base,
JsonFormat.Value overrides)
Helper method that will try to combine values from two
JsonFormat.Value
instances, using one as base settings, and the other as overrides
to use instead of base values when defined; base values are only
use if override does not specify a value (matching value is null
or logically missing). |
static JsonFormat.Value |
mergeAll(JsonFormat.Value... values) |
String |
timeZoneAsString()
Alternate access (compared to
getTimeZone() ) which is useful
when caller just wants time zone id to convert, but not as JDK
provided TimeZone |
String |
toString() |
Class<JsonFormat> |
valueFor()
Introspection method that may be used to find actual annotation that may be used
as the source for value instance.
|
JsonFormat.Value |
withFeature(JsonFormat.Feature f) |
JsonFormat.Value |
withLenient(Boolean lenient) |
JsonFormat.Value |
withLocale(Locale l) |
JsonFormat.Value |
withoutFeature(JsonFormat.Feature f) |
JsonFormat.Value |
withOverrides(JsonFormat.Value overrides) |
JsonFormat.Value |
withPattern(String p) |
JsonFormat.Value |
withShape(JsonFormat.Shape s) |
JsonFormat.Value |
withTimeZone(TimeZone tz) |
public Value()
public Value(JsonFormat ann)
public Value(String p, JsonFormat.Shape sh, String localeStr, String tzStr, JsonFormat.Features f, Boolean lenient)
public Value(String p, JsonFormat.Shape sh, Locale l, TimeZone tz, JsonFormat.Features f, Boolean lenient)
public Value(String p, JsonFormat.Shape sh, Locale l, String tzStr, TimeZone tz, JsonFormat.Features f, Boolean lenient)
@Deprecated public Value(String p, JsonFormat.Shape sh, Locale l, String tzStr, TimeZone tz, JsonFormat.Features f)
@Deprecated public Value(String p, JsonFormat.Shape sh, String localeStr, String tzStr, JsonFormat.Features f)
@Deprecated public Value(String p, JsonFormat.Shape sh, Locale l, TimeZone tz, JsonFormat.Features f)
public static final JsonFormat.Value empty()
public static JsonFormat.Value merge(JsonFormat.Value base, JsonFormat.Value overrides)
JsonFormat.Value
instances, using one as base settings, and the other as overrides
to use instead of base values when defined; base values are only
use if override does not specify a value (matching value is null
or logically missing).
Note that one or both of value instances may be `null`, directly;
if both are `null`, result will also be `null`; otherwise never null.public static JsonFormat.Value mergeAll(JsonFormat.Value... values)
public static final JsonFormat.Value from(JsonFormat ann)
public final JsonFormat.Value withOverrides(JsonFormat.Value overrides)
public static JsonFormat.Value forPattern(String p)
public static JsonFormat.Value forShape(JsonFormat.Shape sh)
public static JsonFormat.Value forLeniency(boolean lenient)
public JsonFormat.Value withPattern(String p)
public JsonFormat.Value withShape(JsonFormat.Shape s)
public JsonFormat.Value withLocale(Locale l)
public JsonFormat.Value withTimeZone(TimeZone tz)
public JsonFormat.Value withLenient(Boolean lenient)
public JsonFormat.Value withFeature(JsonFormat.Feature f)
public JsonFormat.Value withoutFeature(JsonFormat.Feature f)
public Class<JsonFormat> valueFor()
JacksonAnnotationValue
valueFor
in interface JacksonAnnotationValue<JsonFormat>
public String getPattern()
public JsonFormat.Shape getShape()
public Locale getLocale()
public Boolean getLenient()
Boolean.TRUE
if explicitly set to true; Boolean.FALSE
if explicit set to false; or null
if not set either way (assuming
"default leniency" for the context)public boolean isLenient()
Boolean.TRUE.equals(getLenient())that is, returns
true
if (and only if) leniency has been explicitly
set to {code true}; but not if it is undefined.public String timeZoneAsString()
getTimeZone()
) which is useful
when caller just wants time zone id to convert, but not as JDK
provided TimeZone
public TimeZone getTimeZone()
public boolean hasShape()
public boolean hasPattern()
public boolean hasLocale()
public boolean hasTimeZone()
public boolean hasLenient()
public Boolean getFeature(JsonFormat.Feature f)
Boolean.TRUE
or
Boolean.FALSE
, indicating 'yes/no/dunno' choices, where `null` ("dunno")
indicates that the default handling should be used based on global defaults,
and there is no format override.public JsonFormat.Features getFeatures()
Copyright © 2008–2024 FasterXML. All rights reserved.