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)
Deprecated.
since 2.6
|
Value(String p,
JsonFormat.Shape sh,
Locale l,
String tzStr,
TimeZone tz,
JsonFormat.Features f) |
Value(String p,
JsonFormat.Shape sh,
Locale l,
TimeZone tz)
Deprecated.
since 2.6
|
Value(String p,
JsonFormat.Shape sh,
Locale l,
TimeZone tz,
JsonFormat.Features f) |
Value(String p,
JsonFormat.Shape sh,
String localeStr,
String tzStr)
Deprecated.
since 2.6
|
Value(String p,
JsonFormat.Shape sh,
String localeStr,
String tzStr,
JsonFormat.Features f) |
Modifier and Type | Method and Description |
---|---|
static JsonFormat.Value |
empty() |
boolean |
equals(Object o) |
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.
|
Locale |
getLocale() |
String |
getPattern() |
JsonFormat.Shape |
getShape() |
TimeZone |
getTimeZone() |
int |
hashCode() |
boolean |
hasLocale() |
boolean |
hasPattern() |
boolean |
hasShape() |
boolean |
hasTimeZone() |
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 |
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)
public Value(String p, JsonFormat.Shape sh, Locale l, TimeZone tz, JsonFormat.Features f)
public Value(String p, JsonFormat.Shape sh, Locale l, String tzStr, TimeZone tz, JsonFormat.Features f)
@Deprecated public Value(String p, JsonFormat.Shape sh, Locale l, TimeZone tz)
@Deprecated public Value(String p, JsonFormat.Shape sh, String localeStr, String tzStr)
@Deprecated public Value(String p, JsonFormat.Shape sh, Locale l, String tzStr, TimeZone tz)
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 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 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 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 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–2017 FasterXML. All rights reserved.