Class SelectionContext
- java.lang.Object
-
- org.mapstruct.ap.internal.model.source.selector.SelectionContext
-
public class SelectionContext extends Object
Context passed to the selectors to get the information they need.- Author:
- Filip Hrisafov
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static SelectionContextforFactoryMethods(Method mappingMethod, Type alternativeTarget, SelectionParameters selectionParameters, TypeFactory typeFactory)static SelectionContextforLifecycleMethods(Method mappingMethod, Type targetType, SelectionParameters selectionParameters, TypeFactory typeFactory)static SelectionContextforMappingMethods(Method mappingMethod, Type source, Type target, SelectionCriteria criteria, TypeFactory typeFactory)static SelectionContextforPresenceCheckMethods(Method mappingMethod, SelectionParameters selectionParameters, TypeFactory typeFactory)List<ParameterBinding>getAvailableParameterBindings()MethodgetMappingMethod()TypegetMappingTargetType()TypegetReturnType()SelectionCriteriagetSelectionCriteria()TypegetSourceType()
-
-
-
Method Detail
-
getSourceType
public Type getSourceType()
- Returns:
- the source type that should be matched
-
getSelectionCriteria
public SelectionCriteria getSelectionCriteria()
- Returns:
- the criteria used in the selection process
-
getMappingTargetType
public Type getMappingTargetType()
- Returns:
- the mapping target type that should be matched
-
getReturnType
public Type getReturnType()
- Returns:
- the return type that should be matched
-
getAvailableParameterBindings
public List<ParameterBinding> getAvailableParameterBindings()
- Returns:
- the available parameter bindings for the matching
-
getMappingMethod
public Method 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)
-
forFactoryMethods
public static SelectionContext forFactoryMethods(Method mappingMethod, Type alternativeTarget, SelectionParameters selectionParameters, TypeFactory typeFactory)
-
forPresenceCheckMethods
public static SelectionContext forPresenceCheckMethods(Method mappingMethod, SelectionParameters selectionParameters, TypeFactory typeFactory)
-
-