The name-map is a feature that most users will not require. But, there are certain use cases where its use can be invaluable. For example:

  • If you have a large volume of class to class transformations, you may notice the client reaction time becoming slow. To workaround this use the Java name-map, as it can bypass heavy transform rules with direct class to class mapping at the lowest level.
  • If you can extract a class-to-architecture mapping from another tool, this will avoid the need to re-enter the mapping in (Re-)Structure101.
  • If there are certain classes you’d like to “mark”, e.g. if there are API classes you wish to indicate as not movable, you can do this by adding a prefix or suffix to the class name as a visual indication. E.g. you could map com.myco.MyApiClass to com.myco.API_DO_NOT_TOUCH__MyApiClass

These are just some of the use cases already being used by our customers.

To enable a name map, first create a text file with the from and to class name on one line, separated by a tab character. An example file can be seen if you export Transformations, as it is the same file format. e.g.

Then, add the following property to the top of your project file <property name=”name-map-location” value=”path-to-you-class-map-file.txt”/>. And that’s it.

As long as this file is found the client software will attempt to map the classes as you’ve defined.

For the IDE plugin to map the same classes, you must publish a snapshot where a name map was specfied and loaded for it.

Note that this map does not support wildcards.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

This site uses Akismet to reduce spam. Learn how your comment data is processed.