-
- All Superinterfaces:
Marshaller<Object>
- All Known Subinterfaces:
EntityBean
,MarshallingObject
,ReadableBean
,ReadableBeanProperty<V>
,ReadableBigDecimalProperty
,ReadableBigIntegerProperty
,ReadableBooleanProperty
,ReadableByteProperty
,io.github.mmm.property.container.collection.ReadableCollectionProperty<V,E>
,ReadableContainerProperty<V,E>
,ReadableDoubleProperty
,ReadableFloatProperty
,ReadableInstantProperty
,ReadableIntegerProperty
,ReadableListProperty<E>
,ReadableLocalDateProperty
,ReadableLocalDateTimeProperty
,ReadableLocalTimeProperty
,ReadableLongProperty
,ReadableMapProperty<K,V>
,ReadableNumberProperty<N>
,ReadableObjectProperty<V>
,ReadableOffsetDateTimeProperty
,ReadableOffsetTimeProperty
,ReadableProperty<V>
,ReadableRangeProperty<V>
,ReadableSetProperty<E>
,ReadableShortProperty
,ReadableSimpleProperty<V>
,ReadableStringProperty
,ReadableZonedDateTimeProperty
,VirtualBean
,WritableBean
,WritableBeanProperty<V>
,WritableBigDecimalProperty
,WritableBigIntegerProperty
,WritableBooleanProperty
,WritableByteProperty
,io.github.mmm.property.container.collection.WritableCollectionProperty<V,E>
,WritableContainerProperty<V,E>
,WritableDoubleProperty
,WritableFloatProperty
,WritableInstantProperty
,WritableIntegerProperty
,WritableListProperty<E>
,WritableLocalDateProperty
,WritableLocalDateTimeProperty
,WritableLocalTimeProperty
,WritableLongProperty
,WritableMapProperty<K,V>
,WritableNumberProperty<N>
,WritableObjectProperty<V>
,WritableOffsetDateTimeProperty
,WritableOffsetTimeProperty
,WritableProperty<V>
,WritableRangeProperty<V>
,WritableSetProperty<E>
,WritableShortProperty
,WritableSimpleProperty<V>
,WritableStringProperty
,WritableZonedDateTimeProperty
- All Known Implementing Classes:
AbstractBean
,AbstractVirtualBean
,AdvancedBean
,Bean
,BeanProperty
,BigDecimalProperty
,BigIntegerProperty
,BooleanProperty
,ByteProperty
,io.github.mmm.property.container.collection.CollectionProperty
,ContainerProperty
,DoubleProperty
,DurationInSecondsProperty
,DynamicBean
,FloatProperty
,IdProperty
,InstantProperty
,IntegerProperty
,LinkProperty
,ListProperty
,LocalDateProperty
,LocalDateTimeProperty
,LocalTimeProperty
,LongProperty
,MapProperty
,NumberProperty
,ObjectProperty
,OffsetDateTimeProperty
,OffsetTimeProperty
,Property
,RangeProperty
,SetProperty
,ShortProperty
,SimpleEntityBean
,SimpleProperty
,StringListProperty
,StringProperty
,TemporalProperty
,ZonedDateTimeProperty
public interface MarshallableObject extends Marshaller<Object>
Interface for an object that canwrite itself
to structured formats such as JSON or XML. The generic type is bound toObject
since Java does not properly support <SELF> leading to trouble in usage.- Since:
- 1.0.0
- See Also:
UnmarshallableObject
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description void
write(StructuredWriter writer)
default void
writeObject(StructuredWriter writer, Object object)
-
-
-
Method Detail
-
writeObject
default void writeObject(StructuredWriter writer, Object object)
- Specified by:
writeObject
in interfaceMarshaller<Object>
- Parameters:
writer
- theStructuredWriter
where to write the data of the givenobject
to. Create via e.g.JsonFormat.get().writer(writer)
orXmlFormat.get().writer(writer)
.object
- the object to serialize or marshall. If this is an instance ofMarshallableObject
then this has to be the called instance itself.
-
write
void write(StructuredWriter writer)
- Parameters:
writer
- theStructuredWriter
where to marshall (serialize) the data of this object to.- See Also:
writeObject(StructuredWriter, Object)
-
-