public interface Dumpable
Modifier and Type | Method | Description |
---|---|---|
default Map<String,String> |
toDump() |
Dumps the state of the implementing instance into a
Map which is
returned as result. |
default Map<String,String> |
toDump(Map<String,String> aDump) |
Dumps the state of the implementing instance into the provided
Map which is returned as result. |
default Map<String,String> toDump()
Map
which is
returned as result. The toDump()
method may call the
toDump(Map)
methods of internal instances also being part of the
state. The default implementation creates a new Map
and calls
toDump(Map)
. So you most probably implement the
toDump(Map)
method.Map
with the dumped properties of the implementing
instance.default Map<String,String> toDump(Map<String,String> aDump)
Map
which is returned as result. The toDump(Map)
method
may call the toDump(Map)
methods of internal instances also
being part of the state. You most probably implement the
toDump(Map)
method as the toDump()
method has a default
implementation invoking toDump(Map)
with an empty Map
.
This default implementation uses reflection to create a basic dump.
Map
properties are processed but not recursively digged into.
Existing properties are overwritten in case shadowing super-class's
properties.Copyright © 2018. All rights reserved.