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 describein
propertyEntries[0]
will describepropA
propertyEntries[1]
will describepropB
- Author:
- Sjaak Derksen
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
TargetReference.Builder
Builds aTargetReference
from 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()
String
getShallowestPropertyName()
boolean
isNested()
TargetReference
pop()
String
toString()
-
-
-
Method Detail
-
getShallowestPropertyName
public String getShallowestPropertyName()
- Returns:
- the property name on the shallowest nesting level
-
isNested
public boolean isNested()
-
pop
public TargetReference pop()
-
-