Package org.mapstruct.ap.internal.model
Class LifecycleMethodResolver
java.lang.Object
org.mapstruct.ap.internal.model.LifecycleMethodResolver
Factory for creating lists of appropriate
LifecycleCallbackMethodReferences- Author:
- Andreas Gudian
-
Method Summary
Modifier and TypeMethodDescriptionstatic List<LifecycleCallbackMethodReference> afterMappingMethods(Method method, Type alternativeTarget, SelectionParameters selectionParameters, MappingBuilderContext ctx, Set<String> existingVariableNames, Supplier<List<ParameterBinding>> parameterBindingsProvider) static List<LifecycleCallbackMethodReference> afterMappingMethods(Method method, SelectionParameters selectionParameters, MappingBuilderContext ctx, Set<String> existingVariableNames) static List<LifecycleCallbackMethodReference> beforeMappingMethods(Method method, Type alternativeTarget, SelectionParameters selectionParameters, MappingBuilderContext ctx, Set<String> existingVariableNames) static List<LifecycleCallbackMethodReference> beforeMappingMethods(Method method, SelectionParameters selectionParameters, MappingBuilderContext ctx, Set<String> existingVariableNames)
-
Method Details
-
beforeMappingMethods
public static List<LifecycleCallbackMethodReference> beforeMappingMethods(Method method, Type alternativeTarget, SelectionParameters selectionParameters, MappingBuilderContext ctx, Set<String> existingVariableNames) - Parameters:
method- the method to obtain the beforeMapping methods foralternativeTarget- alternative toMethod.getResultType()e.g. when target is abstractselectionParameters- method selectionParametersctx- the builder contextexistingVariableNames- the existing variable names in the mapping method- Returns:
- all applicable
@BeforeMappingmethods for the given method
-
afterMappingMethods
public static List<LifecycleCallbackMethodReference> afterMappingMethods(Method method, Type alternativeTarget, SelectionParameters selectionParameters, MappingBuilderContext ctx, Set<String> existingVariableNames, Supplier<List<ParameterBinding>> parameterBindingsProvider) - Parameters:
method- the method to obtain the afterMapping methods foralternativeTarget- alternative toMethod.getResultType()e.g. when target is abstractselectionParameters- method selectionParametersctx- the builder contextexistingVariableNames- list of already used variable names- Returns:
- all applicable
@AfterMappingmethods for the given method
-
beforeMappingMethods
public static List<LifecycleCallbackMethodReference> beforeMappingMethods(Method method, SelectionParameters selectionParameters, MappingBuilderContext ctx, Set<String> existingVariableNames) - Parameters:
method- the method to obtain the beforeMapping methods forselectionParameters- method selectionParametersctx- the builder contextexistingVariableNames- the existing variable names in the mapping method- Returns:
- all applicable
@BeforeMappingmethods for the given method
-
afterMappingMethods
public static List<LifecycleCallbackMethodReference> afterMappingMethods(Method method, SelectionParameters selectionParameters, MappingBuilderContext ctx, Set<String> existingVariableNames) - Parameters:
method- the method to obtain the afterMapping methods forselectionParameters- method selectionParametersctx- the builder contextexistingVariableNames- list of already used variable names- Returns:
- all applicable
@AfterMappingmethods for the given method
-