Package org.refcodes.mixin
Interface Dumpable
-
public interface Dumpable
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default Map<String,String>
toDump()
Dumps the state of the implementing instance into aMap
which is returned as result.default Map<String,String>
toDump(Map<String,String> aDump)
Dumps the state of the implementing instance into the providedMap
which is returned as result.default String
toPrintable()
Creates a printable representation of the content of this map.
-
-
-
Method Detail
-
toDump
default Map<String,String> toDump()
Dumps the state of the implementing instance into aMap
which is returned as result. ThetoDump()
method may call thetoDump(Map)
methods of internal instances also being part of the state. The default implementation creates a newMap
and callstoDump(Map)
. So you most probably implement thetoDump(Map)
method.- Returns:
- The
Map
with the dumped properties of the implementing instance.
-
toDump
default Map<String,String> toDump(Map<String,String> aDump)
Dumps the state of the implementing instance into the providedMap
which is returned as result. ThetoDump(Map)
method may call thetoDump(Map)
methods of internal instances also being part of the state. You most probably implement thetoDump(Map)
method as thetoDump()
method has a default implementation invokingtoDump(Map)
with an emptyMap
. 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.
-
-