Class SelectionContext
java.lang.Object
org.mapstruct.ap.internal.model.source.selector.SelectionContext
Context passed to the selectors to get the information they need.
- Author:
- Filip Hrisafov
-
Method Summary
Modifier and TypeMethodDescriptionstatic SelectionContextforFactoryMethods(Method mappingMethod, Type alternativeTarget, SelectionParameters selectionParameters, TypeFactory typeFactory) static SelectionContextforLifecycleMethods(Method mappingMethod, Type targetType, SelectionParameters selectionParameters, TypeFactory typeFactory, Supplier<List<ParameterBinding>> additionalParameterBindingsProvider) static SelectionContextforMappingMethods(Method mappingMethod, Type source, Type target, SelectionCriteria criteria, TypeFactory typeFactory) static SelectionContextforPresenceCheckMethods(Method mappingMethod, SelectionParameters selectionParameters, TypeFactory typeFactory) static SelectionContextforSourceParameterPresenceCheckMethods(Method mappingMethod, SelectionParameters selectionParameters, Parameter sourceParameter, TypeFactory typeFactory)
-
Method Details
-
getSourceType
- Returns:
- the source type that should be matched
-
getSelectionCriteria
- Returns:
- the criteria used in the selection process
-
getMappingTargetType
- Returns:
- the mapping target type that should be matched
-
getReturnType
- Returns:
- the return type that should be matched
-
getAvailableParameterBindings
- Returns:
- the available parameter bindings for the matching
-
getMappingMethod
- Returns:
- the mapping method, defined in Mapper for which this selection is carried out
-
forMappingMethods
public static SelectionContext forMappingMethods(Method mappingMethod, Type source, Type target, SelectionCriteria criteria, TypeFactory typeFactory) -
forLifecycleMethods
public static SelectionContext forLifecycleMethods(Method mappingMethod, Type targetType, SelectionParameters selectionParameters, TypeFactory typeFactory, Supplier<List<ParameterBinding>> additionalParameterBindingsProvider) -
forFactoryMethods
public static SelectionContext forFactoryMethods(Method mappingMethod, Type alternativeTarget, SelectionParameters selectionParameters, TypeFactory typeFactory) -
forPresenceCheckMethods
public static SelectionContext forPresenceCheckMethods(Method mappingMethod, SelectionParameters selectionParameters, TypeFactory typeFactory) -
forSourceParameterPresenceCheckMethods
public static SelectionContext forSourceParameterPresenceCheckMethods(Method mappingMethod, SelectionParameters selectionParameters, Parameter sourceParameter, TypeFactory typeFactory)
-