public class SourceReference extends AbstractReference
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 in
propertyEntries[0]
will describe propA
propertyEntries[1]
will describe propB
AbstractReference.isValid()
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 |
pop() |
List<SourceReference> |
push(TypeFactory typeFactory,
FormattingMessager messager,
Method method) |
getDeepestProperty, getDeepestPropertyName, getElementNames, getParameter, getPropertyEntries, getShallowestProperty, getShallowestPropertyName, isNested, isValid, toString
public SourceReference pop()
public List<SourceReference> push(TypeFactory typeFactory, FormattingMessager messager, Method method)
Copyright © 2012-2021 MapStruct Authors; All rights reserved. Released under the Apache Software License 2.0.