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:parameterwill describeinpropertyEntries[0]will describepropApropertyEntries[1]will describepropB
- Author:
- Sjaak Derksen
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classTargetReference.BuilderBuilds aTargetReferencefrom an@Mappping.
-
Constructor Summary
Constructors Constructor Description TargetReference(Parameter parameter, List<String> propertyEntries)TargetReference(Parameter parameter, List<String> propertyEntries, List<String> pathProperties)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<String>getElementNames()List<String>getPathProperties()List<String>getPropertyEntries()StringgetShallowestPropertyName()booleanisNested()TargetReferencepop()StringtoString()
-
-
-
Method Detail
-
getShallowestPropertyName
public String getShallowestPropertyName()
- Returns:
- the property name on the shallowest nesting level
-
isNested
public boolean isNested()
-
pop
public TargetReference pop()
-
-