Package org.mapstruct.ap.internal.model
Class ObjectFactoryMethodResolver
- java.lang.Object
-
- org.mapstruct.ap.internal.model.ObjectFactoryMethodResolver
-
public class ObjectFactoryMethodResolver extends Object
- Author:
- Sjaak Derksen
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static MethodReference
getBuilderFactoryMethod(Type typeToBuild, BuilderType builder)
static MethodReference
getBuilderFactoryMethod(Method method, BuilderType builder)
static MethodReference
getFactoryMethod(Method method, Type alternativeTarget, SelectionParameters selectionParameters, MappingBuilderContext ctx)
returns a no arg factory methodstatic MethodReference
getFactoryMethod(Method method, SelectionParameters selectionParameters, MappingBuilderContext ctx)
returns a no arg factory methodstatic MethodReference
getFactoryMethodReference(Method method, SelectedMethod<SourceMethod> matchingFactoryMethod, MappingBuilderContext ctx)
static List<SelectedMethod<SourceMethod>>
getMatchingFactoryMethods(Method method, Type alternativeTarget, SelectionParameters selectionParameters, MappingBuilderContext ctx)
-
-
-
Method Detail
-
getFactoryMethod
public static MethodReference getFactoryMethod(Method method, SelectionParameters selectionParameters, MappingBuilderContext ctx)
returns a no arg factory method- Parameters:
method
- target mapping methodselectionParameters
- parameters used in the selection processctx
- the mapping builder context- Returns:
- a method reference to the factory method, or null if no suitable, or ambiguous method found
-
getFactoryMethod
public static MethodReference getFactoryMethod(Method method, Type alternativeTarget, SelectionParameters selectionParameters, MappingBuilderContext ctx)
returns a no arg factory method- Parameters:
method
- target mapping methodalternativeTarget
- alternative toMethod.getResultType()
e.g. when target is abstractselectionParameters
- parameters used in the selection processctx
- the mapping builder context- Returns:
- a method reference to the factory method, or null if no suitable, or ambiguous method found
-
getFactoryMethodReference
public static MethodReference getFactoryMethodReference(Method method, SelectedMethod<SourceMethod> matchingFactoryMethod, MappingBuilderContext ctx)
-
getMatchingFactoryMethods
public static List<SelectedMethod<SourceMethod>> getMatchingFactoryMethods(Method method, Type alternativeTarget, SelectionParameters selectionParameters, MappingBuilderContext ctx)
-
getBuilderFactoryMethod
public static MethodReference getBuilderFactoryMethod(Method method, BuilderType builder)
-
getBuilderFactoryMethod
public static MethodReference getBuilderFactoryMethod(Type typeToBuild, BuilderType builder)
-
-