Class SourceReference

java.lang.Object
org.mapstruct.ap.internal.model.beanmapping.AbstractReference
org.mapstruct.ap.internal.model.beanmapping.SourceReference

public class SourceReference extends AbstractReference
This class describes the source side of a property mapping.

It contains the source parameter, and all individual (nested) property entries. So consider the following mapping method:

 @Mapping(target = "propC", source = "in.propA.propB")
 TypeB mappingMethod(TypeA in);
 
Then:
  • parameter will describe in
  • propertyEntries[0] will describe propA
  • propertyEntries[1] will describe propB
After building, AbstractReference.isValid() will return true when no problems are detected during building.
Author:
Sjaak Derksen, Filip Hrisafov