
public class SetterWrapper extends AssignmentWrapper
Assignment.AssignmentTypeWritable.ContextfieldAssignment| Constructor and Description |
|---|
SetterWrapper(Assignment rhs,
List<Type> thrownTypesToExclude,
boolean fieldAssignment) |
SetterWrapper(Assignment rhs,
List<Type> thrownTypesToExclude,
boolean fieldAssignment,
boolean includeSourceNullCheck,
boolean setExplicitlyToNull,
boolean setExplicitlyToDefault) |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
doSourceNullCheck(Assignment rhs,
org.mapstruct.ap.internal.prism.NullValueCheckStrategyPrism nvcs,
org.mapstruct.ap.internal.prism.NullValuePropertyMappingStrategyPrism nvpms,
Type targetType)
Wraps the assignment in a target setter. include a null check when
- Not if source is the parameter iso property, because the null check is than handled by the bean mapping
- Not when source is primitive, you can't null check a primitive
- The source property is fed to a conversion somehow before its assigned to the target
- The user decided to ALLWAYS include a null check
|
List<Type> |
getThrownTypes()
returns all types exception types thrown by this assignment.
|
boolean |
isIncludeSourceNullCheck() |
boolean |
isSetExplicitlyToDefault() |
boolean |
isSetExplicitlyToNull() |
createUniqueVarName, getAssignment, getImportTypes, getSourceLocalVarName, getSourceLoopVarName, getSourceParameterName, getSourcePresenceCheckerReference, getSourceReference, getSourceType, getType, isCallingUpdateMethod, isFieldAssignment, isSourceReferenceParameter, setAssignment, setSourceLocalVarName, setSourceLoopVarNamegetTemplateName, getTemplateNameForClass, writepublic SetterWrapper(Assignment rhs, List<Type> thrownTypesToExclude, boolean fieldAssignment, boolean includeSourceNullCheck, boolean setExplicitlyToNull, boolean setExplicitlyToDefault)
public SetterWrapper(Assignment rhs, List<Type> thrownTypesToExclude, boolean fieldAssignment)
public List<Type> getThrownTypes()
AssignmentgetThrownTypes in interface AssignmentgetThrownTypes in class AssignmentWrapperpublic boolean isSetExplicitlyToNull()
public boolean isSetExplicitlyToDefault()
public boolean isIncludeSourceNullCheck()
public static boolean doSourceNullCheck(Assignment rhs, org.mapstruct.ap.internal.prism.NullValueCheckStrategyPrism nvcs, org.mapstruct.ap.internal.prism.NullValuePropertyMappingStrategyPrism nvpms, Type targetType)
rhs - the source righthand sidenvcs - null value check strategynvpms - null value property mapping strategytargetType - the target typeCopyright © 2012-2019 MapStruct Authors; All rights reserved. Released under the Apache Software License 2.0.