public class LifecycleCallbackMethodReference extends MethodReference
@BeforeMapping
or @AfterMapping
.Assignment.AssignmentType
Writable.Context
Modifier and Type | Method and Description |
---|---|
static LifecycleCallbackMethodReference |
forMethodReference(SelectedMethod<SourceMethod> lifecycleMethod,
MapperReference mapperReference,
Method containingMethod,
Set<String> existingVariableNames) |
static LifecycleCallbackMethodReference |
forParameterProvidedMethod(SelectedMethod<SourceMethod> lifecycleMethod,
Parameter providingParameter,
Method containingMethod,
Set<String> existingVariableNames) |
Type |
getDeclaringType() |
Set<Type> |
getImportTypes()
Returns a set containing those
Type s referenced by this model element for which an import statement needs
to be declared. |
Type |
getMethodResultType()
Returns the result type of the mapping method in which this callback method is called
|
Type |
getMethodReturnType()
Returns the return type of the mapping method in which this callback method is called
|
String |
getTargetVariableName() |
boolean |
hasMappingTargetParameter() |
boolean |
hasReturnType() |
createUniqueVarName, equals, forBuiltInMethod, forConstructorInvocation, forForgedMethod, forMapperReference, forMethodCall, forParameterProvidedMethod, forStaticBuilder, getAssignment, getContextParam, getDeclaringMapper, getDefiningType, getMapperVariableName, getName, getParameterBindings, getProvidingParameter, getReturnType, getSingleSourceParameterType, getSourceLocalVarName, getSourceLoopVarName, getSourceParameterName, getSourceParameters, getSourcePresenceCheckerReference, getSourceReference, getSourceType, getThrownTypes, getType, hashCode, inferTypeWhenEnum, isCallingUpdateMethod, isConstructor, isSourceReferenceParameter, isStatic, setAssignment, setSourceLocalVarName, setSourceLoopVarName, toString
getTemplateName, getTemplateNameForClass, write
public Type getDeclaringType()
public Type getMethodReturnType()
Method.getReturnType()
public Type getMethodResultType()
Method.getResultType()
public String getTargetVariableName()
public Set<Type> getImportTypes()
ModelElement
Type
s referenced by this model element for which an import statement needs
to be declared.getImportTypes
in interface Assignment
getImportTypes
in class MethodReference
null
.public boolean hasMappingTargetParameter()
public boolean hasReturnType()
public static LifecycleCallbackMethodReference forParameterProvidedMethod(SelectedMethod<SourceMethod> lifecycleMethod, Parameter providingParameter, Method containingMethod, Set<String> existingVariableNames)
public static LifecycleCallbackMethodReference forMethodReference(SelectedMethod<SourceMethod> lifecycleMethod, MapperReference mapperReference, Method containingMethod, Set<String> existingVariableNames)
Copyright © 2012-2021 MapStruct Authors; All rights reserved. Released under the Apache Software License 2.0.