Package org.apache.juneau.marshall.yaml
Annotation Interface YamlConfig
@Target({TYPE,METHOD})
@Retention(RUNTIME)
@Inherited
@ContextApply({SerializerApply.class,ParserApply.class})
public @interface YamlConfig
Annotation for specifying config properties defined in
YamlSerializer and YamlParser.
Used primarily for specifying bean configuration properties on REST classes and methods.
-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionAdd"_type" properties when needed.intOptional rank for this config.
-
Element Details
-
addBeanTypes
Add"_type" properties when needed.If
"true" , then"_type" properties will be added to beans if their type cannot be inferred through reflection.When present, this value overrides the
Serializer.Builder#addBeanTypes()setting and is provided to customize the behavior of specific serializers in aSerializerSet."true" "false" (default)
Notes:
-
Supports VarResolver.DEFAULT (e.g.
"$C{myConfigVar}" ).
See Also:
- Returns:
- The annotation value.
- Default:
- ""
-
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
-