String nameDef = "name:{getAttribute(\"name\")|setAttribute(\"name\",%s)|type=ma.glasnost.orika.test.property.PropertyResolverTestCase$Element}";
String firstNameDef = "first:{getAttribute(\"first\")|setAttribute(\"first\", %s)|type=java.lang.String}";
String lastNameDef = "last:{getAttribute(\"last\")|setAttribute(\"last\", %s)|type=java.lang.String}";
factory.classMap(Element.class, PersonDto.class)
.field(employmentDef + "." + jobTitleDef, "jobTitles")
.field("employment." + salaryDef, "salary") // reuse the in-line declaration of 'employment' property
.field(nameDef + "." + firstNameDef, "firstName")
.field("name." + lastNameDef, "lastName") // reuses the in-line declaration of 'name' property
.register();