
public class SourceReference extends Object
It contains the source parameter, and all individual (nested) property entries. So consider the following mapping method:
@Mapping(source = "in.propA.propB" target = "propC") TypeB mappingMethod(TypeA in);Then:
parameter will describe inpropertyEntries[0] will describe propApropertyEntries[1] will describe propBisValid() will return true when when no problems are detected during building.| Modifier and Type | Class and Description |
|---|---|
static class |
SourceReference.BuilderFromMapping
Builds a
SourceReference from an @Mappping. |
static class |
SourceReference.BuilderFromProperty
Builds a
SourceReference from a property. |
static class |
SourceReference.BuilderFromSourceReference
Builds a
SourceReference from a property. |
| Modifier and Type | Method and Description |
|---|---|
SourceReference |
copyForInheritanceTo(SourceMethod method)
Creates a copy of this reference, which is adapted to the given method
|
List<String> |
getElementNames() |
Parameter |
getParameter() |
List<PropertyEntry> |
getPropertyEntries() |
boolean |
isValid() |
SourceReference |
pop() |
String |
toString() |
public Parameter getParameter()
public List<PropertyEntry> getPropertyEntries()
public boolean isValid()
public SourceReference copyForInheritanceTo(SourceMethod method)
method - the method to create the copy forpublic SourceReference pop()
Copyright © 2012-2019 MapStruct Authors; All rights reserved. Released under the Apache Software License 2.0.