15.3. SwitchYard Annotations for Serialization

The org.switchyard.serial.graph package provides the following annotations, enums, interface and class:
@Strategy
Here you can define the serialization strategy, including access type, coverage type, and factory for your class. All these are optional.
  • access=AccessType: BEAN (default) for getter/setter property access, FIELD for member variable access.
  • coverage=CoverageType: INCLUSIVE (default) for serializing all properties, EXCLUSIVE for ignoring all properties.
  • factory=Factory: Interface for how the class gets instantiated.
    • DefaultFactory: Creates an instance of the class using the default constructor.
@Include
You can place this on individual getter methods or fields to override CoverageType.EXCLUSIVE.
@Exclude
You can place this on individual getter methods or fields to override CoverageType.INCLUSIVE.