Dozer provides optional support for standard java expression language (javax.el).
Current support for expressions is start-up time only. Expressions are not resolved during each mapping, but rather during Xml mapping file loading procedure. Each attribute or node value can contain a valid EL expression ${}.
Dozer supports any EL implementation written against javax.el standard API. Functionality is tested with JUEL internally, but other EL providers should be working as well.
You can define global variables for the mapper in variables configuration block.
<configuration> <wildcard>true</wildcard> <variables> <variable name="type_name">org.dozer.sample.MyType </variable> </variables> <mapping> <class-a>${type_name}</class-a> ... </configuration>