Annotation Interface MarshalledConfig
MarshallingContext and MarshallingTraverseContext.
Used primarily for specifying marshalling configuration properties on REST classes and methods.
This annotation is the marshalling-only sibling of @BeanConfig.
Bean-modeling attributes (visibility settings, fluent-setter detection, property naming, not-bean
exclusions, etc.) live on @BeanConfig in
juneau-commons. Attributes that affect wire format, type discriminators, swap classes,
locale/media-type/timezone, and debug mode stay here on @MarshalledConfig.
-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionBig-number wire format forBigInteger/BigDecimalvalues.Binary wire format forvalues.byte []BitSet wire format.Boolean wire format forBoolean/values.boolean Calendar wire format.Class wire format forClassvalues.Currency wire format forCurrencyvalues.Date wire format.Debug mode.Class<?>[]Bean dictionary.Class<?>[]Replace bean dictionary.Duration wire format.Enum wire format.Locale.Locale wire format.Media type.Period wire format.intOptional rank for this config.Class<?>[]Java object swaps.Class<?>[]Replace Java object swap classes.Temporal wire format.Time zone.Time-zone wire format.Bean type property name.UUID wire format.
-
Element Details
-
debug
Debug mode.Enables the following additional information during serialization:
- When bean getters throws exceptions, the exception includes the object stack information in order to determine how that method was invoked.
-
Enables
MarshallingTraverseContext.Builder.detectRecursions().
Enables the following additional information during parsing:
- When bean setters throws exceptions, the exception includes the object stack information in order to determine how that method was invoked.
"true" "false" (default)
Notes:
-
Supports VarResolver.DEFAULT (e.g.
"$C{myConfigVar}" ).
See Also:
- Returns:
- The annotation value.
- Default:
- ""
-
dictionary
Class<?>[] dictionaryBean dictionary.The list of classes that make up the bean dictionary in this bean context.
A dictionary is a name/class mapping used to find class types during parsing when they cannot be inferred through reflection.
The names are defined through the@Marshalled(typeName)annotation defined on the bean class.
For example, if a classFoo has a type-name of"myfoo" , then it would end up serialized as"{_type:'myfoo',...}" .This setting tells the parsers which classes to look for when resolving
"_type" attributes.See Also:
- Returns:
- The annotation value.
- Default:
- {}
-
dictionary_replace
Class<?>[] dictionary_replaceReplace bean dictionary.Same as
dictionary()but replaces any existing value.See Also:
- Returns:
- The annotation value.
- Default:
- {}
-
locale
Locale.Specifies the default locale for serializer and parser sessions.
Notes:
-
Supports VarResolver.DEFAULT (e.g.
"$C{myConfigVar}" ).
See Also:
- Returns:
- The annotation value.
- Default:
- ""
-
Supports VarResolver.DEFAULT (e.g.
-
mediaType
Media type.Specifies the default media type value for serializer and parser sessions.
Notes:
-
Supports VarResolver.DEFAULT (e.g.
"$C{myConfigVar}" ).
See Also:
- Returns:
- The annotation value.
- Default:
- ""
-
Supports VarResolver.DEFAULT (e.g.
-
rank
int rankOptional rank for this config.Can be used to override default ordering and application of config annotations.
- Returns:
- The annotation value.
- Default:
- 0
-
swaps
Java object swaps.Swaps are used to "swap out" non-serializable classes with serializable equivalents during serialization, and "swap in" the non-serializable class during parsing.
An example of a swap would be a
Calendar object that gets swapped out for an ISO8601 string.Multiple swaps can be associated with a single class.
When multiple swaps are applicable to the same class, the media type pattern defined byObjectSwap.forMediaTypes()or@Swap(mediaTypes)are used to come up with the best match.See Also:
- Returns:
- The annotation value.
- Default:
- {}
-
swaps_replace
Class<?>[] swaps_replaceReplace Java object swap classes.Same as
swaps()but replaces any existing value.See Also:
- Returns:
- The annotation value.
- Default:
- {}
-
calendarFormat
Calendar wire format.- Returns:
- The annotation value.
- Default:
- NOT_SET
-
dateFormat
Date wire format.- Returns:
- The annotation value.
- Default:
- NOT_SET
-
durationFormat
Duration wire format.- Returns:
- The annotation value.
- Default:
- NOT_SET
-
localeFormat
Locale wire format.- Returns:
- The annotation value.
- Default:
- NOT_SET
-
periodFormat
Period wire format.- Returns:
- The annotation value.
- Default:
- NOT_SET
-
temporalFormat
Temporal wire format.- Returns:
- The annotation value.
- Default:
- NOT_SET
-
timeZoneFormat
Time-zone wire format.- Returns:
- The annotation value.
- Default:
- NOT_SET
-
binaryFormat
Binary wire format forvalues.byte []- Returns:
- The annotation value.
- Default:
- NOT_SET
-
enumFormat
Enum wire format.- Returns:
- The annotation value.
- Default:
- NOT_SET
-
uuidFormat
UUID wire format.- Returns:
- The annotation value.
- Default:
- NOT_SET
-
bitSetFormat
BitSet wire format.- Returns:
- The annotation value.
- Default:
- NOT_SET
-
bigNumberFormat
Big-number wire format forBigInteger/BigDecimalvalues.- Returns:
- The annotation value.
- Default:
- NOT_SET
-
booleanFormat
Boolean wire format forBoolean/values.boolean - Returns:
- The annotation value.
- Default:
- NOT_SET
-
floatFormat
- Returns:
- The annotation value.
- Default:
- NOT_SET
-
currencyFormat
Currency wire format forCurrencyvalues.- Returns:
- The annotation value.
- Default:
- NOT_SET
-
classFormat
Class wire format forClassvalues.- Returns:
- The annotation value.
- Default:
- NOT_SET
-
timeZone
Time zone.Specifies the default timezone for serializer and parser sessions.
Notes:
-
Supports VarResolver.DEFAULT (e.g.
"$C{myConfigVar}" ).
See Also:
- Returns:
- The annotation value.
- Default:
- ""
-
Supports VarResolver.DEFAULT (e.g.
-
typePropertyName
Bean type property name.This specifies the name of the bean property used to store the dictionary name of a bean type so that the parser knows the data type to reconstruct.
Notes:
-
Default value:
"_type" . -
Supports VarResolver.DEFAULT (e.g.
"$C{myConfigVar}" ).
See Also:
- Returns:
- The annotation value.
- Default:
- ""
-
Default value:
-