Class AbstractCodeCopyMapper
java.lang.Object
io.github.mmm.code.api.copy.AbstractCodeCopyMapper
- All Implemented Interfaces:
CodeCopyMapper
- Direct Known Subclasses:
CodeCopyMapperDefault
Implementation of
CodeCopyMapper for default mapping (copy only children).- Since:
- 1.0.0
- Author:
- Joerg Hohwiller (hohwille at users.sourceforge.net)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract <N extends CodeNode>
NdoMap(N node, CodeCopyType type) protected <N extends CodeNode>
NgetMapping(N node) <N extends CodeNode>
Nmap(N node, CodeCopyType type) <N extends CodeNode>
voidregisterMapping(N source, N target) Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface CodeCopyMapper
mapName
-
Constructor Details
-
AbstractCodeCopyMapper
public AbstractCodeCopyMapper()The constructor.
-
-
Method Details
-
map
- Specified by:
mapin interfaceCodeCopyMapper- Type Parameters:
N- type of the givenCodeNode.- Parameters:
node- theCodeNodeto map. May benullfor simplicity. In such casenullhas to be returned. ExtendAbstractCodeCopyMapperto avoid mistakes.type- theCodeCopyTypedefining the relation of theCodeNodeto map.- Returns:
- the given
CodeNodeor a mapped replacement (e.g. acopyof it).
-
getMapping
- Type Parameters:
N- type of the givenCodeNode.- Parameters:
node- theCodeNodeto get from the existing mapping.- Returns:
- the mapped
CodeNodeornullif no mapping isregistered.
-
doMap
-
registerMapping
-