Class TargetReference

java.lang.Object
org.mapstruct.ap.internal.model.beanmapping.TargetReference

public class TargetReference extends Object
This class describes the target side of a property mapping.

It contains the target 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
Author:
Sjaak Derksen
  • Constructor Details

  • Method Details

    • getPathProperties

      public List<String> getPathProperties()
    • getPropertyEntries

      public List<String> getPropertyEntries()
    • getElementNames

      public List<String> getElementNames()
    • getShallowestPropertyName

      public String getShallowestPropertyName()
      Returns:
      the property name on the shallowest nesting level
    • isNested

      public boolean isNested()
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • pop

      public TargetReference pop()