public class RenamingMapping extends Object implements NameMapping
| Modifier | Constructor and Description |
|---|---|
protected |
RenamingMapping()
Implement in the subclass to initialize itself by calling the map() methods
|
| Modifier and Type | Method and Description |
|---|---|
<T extends Name<?>> |
getName(Name<T> source) |
EnumValueName |
mapEnum(EnumValueName value) |
Procedure<javax.jmi.reflect.RefAssociationLink> |
mapMetaAssociation(AssociationName associationName,
javax.jmi.reflect.RefPackage sourceExtent,
javax.jmi.reflect.RefPackage targetExtent,
Map<javax.jmi.reflect.RefObject,javax.jmi.reflect.RefObject> objectsMap) |
Procedure<javax.jmi.reflect.RefObject> |
mapMetaClass(ClassName className,
javax.jmi.reflect.RefPackage sourceExtent,
javax.jmi.reflect.RefPackage targetExtent,
Map<javax.jmi.reflect.RefObject,javax.jmi.reflect.RefObject> objectsMap) |
Procedure<javax.jmi.reflect.RefObject> |
mapMetaFieldName(FieldName fieldName,
javax.jmi.reflect.RefPackage sourceExtent,
javax.jmi.reflect.RefPackage targetExtent,
Map<javax.jmi.reflect.RefObject,javax.jmi.reflect.RefObject> objectsMap) |
Operation<javax.jmi.reflect.RefStruct> |
mapStruct(StructName structName,
javax.jmi.reflect.RefPackage targetExtent,
Map<javax.jmi.reflect.RefObject,javax.jmi.reflect.RefObject> objectsMap) |
protected void |
set(AssociationName key,
ConstructProcedure<javax.jmi.reflect.RefAssociationLink> translate)
Map an association to a transfer procedure.
|
protected void |
set(ClassName key,
ConstructProcedure<javax.jmi.reflect.RefObject> translate)
Map a class to a conversion procedure
|
protected void |
set(FieldName key,
ConstructProcedure<javax.jmi.reflect.RefObject> translate)
Register a field name transfer method
As of the requirements of
NameMapping.mapMetaFieldName(FieldName, RefPackage, RefPackage, Map), the
procedure should NOT write into target attributes, that are NOT CHANGEABLE. |
protected void |
set(StructName key,
ConstructOperation<javax.jmi.reflect.RefStruct> translate)
Map a struct type to a conversion operation
|
protected <T extends Name<?>> |
set(T key,
T name)
Register a name-to-name mapping
|
protected void |
setBackward(AssociationName key,
AssociationName target)
Mark an association as mapped to the target one in the opposite direction of the links
|
protected void |
setForward(AssociationName key,
AssociationName target)
Mark an association as mapped to the target one in the same direction of the links
|
protected <T extends Name<?>> |
unset(T key)
Mark a class,association, field, enum or struct as not mapped
|
protected RenamingMapping()
protected final <T extends Name<?>> void set(T key, T name)
key - not null qualified name, not a struct namename - not null qualified nameprotected final <T extends Name<?>> void unset(T key)
key - not nullprotected final void set(FieldName key, ConstructProcedure<javax.jmi.reflect.RefObject> translate)
NameMapping.mapMetaFieldName(FieldName, RefPackage, RefPackage, Map), the
procedure should NOT write into target attributes, that are NOT CHANGEABLE.key - not nulltranslate - not nullprotected final void set(AssociationName key, ConstructProcedure<javax.jmi.reflect.RefAssociationLink> translate)
NameMapping.mapMetaAssociation(AssociationName, RefPackage, RefPackage, Map), the
procedure should NOT copy links into target associations, that are DERIVED.key - translate - protected final void setForward(AssociationName key, AssociationName target)
key - not null qualified name of the original associationtarget - not null qualified nameprotected final void setBackward(AssociationName key, AssociationName target)
key - not null qualified name of the original associationtarget - not null qualified nameprotected final void set(ClassName key, ConstructProcedure<javax.jmi.reflect.RefObject> translate)
key - translate - protected final void set(StructName key, ConstructOperation<javax.jmi.reflect.RefStruct> translate)
key - translate - public final Procedure<javax.jmi.reflect.RefObject> mapMetaClass(ClassName className, javax.jmi.reflect.RefPackage sourceExtent, javax.jmi.reflect.RefPackage targetExtent, Map<javax.jmi.reflect.RefObject,javax.jmi.reflect.RefObject> objectsMap)
mapMetaClass in interface NameMappingNameMapping.mapMetaClass(ClassName, RefPackage, RefPackage, Map)public final Procedure<javax.jmi.reflect.RefAssociationLink> mapMetaAssociation(AssociationName associationName, javax.jmi.reflect.RefPackage sourceExtent, javax.jmi.reflect.RefPackage targetExtent, Map<javax.jmi.reflect.RefObject,javax.jmi.reflect.RefObject> objectsMap)
mapMetaAssociation in interface NameMappingNameMapping.mapMetaAssociation(AssociationName, RefPackage, RefPackage, Map)public final Procedure<javax.jmi.reflect.RefObject> mapMetaFieldName(FieldName fieldName, javax.jmi.reflect.RefPackage sourceExtent, javax.jmi.reflect.RefPackage targetExtent, Map<javax.jmi.reflect.RefObject,javax.jmi.reflect.RefObject> objectsMap)
mapMetaFieldName in interface NameMappingNameMapping.mapMetaFieldName(FieldName, RefPackage, RefPackage, Map)public final <T extends Name<?>> Name<T> getName(Name<T> source)
source - not null source metamodel namepublic final EnumValueName mapEnum(EnumValueName value)
mapEnum in interface NameMappingNameMapping.mapEnum(net.mdatools.modelant.core.api.name.EnumValueName)public final Operation<javax.jmi.reflect.RefStruct> mapStruct(StructName structName, javax.jmi.reflect.RefPackage targetExtent, Map<javax.jmi.reflect.RefObject,javax.jmi.reflect.RefObject> objectsMap)
mapStruct in interface NameMappingNameMapping.mapEnum(net.mdatools.modelant.core.api.name.EnumValueName)Copyright © 2001–2018 MDA Tools. All rights reserved.