Package org.mapstruct.ap.internal.model
Class ValueMappingMethod.Builder
- java.lang.Object
-
- org.mapstruct.ap.internal.model.ValueMappingMethod.Builder
-
- Enclosing class:
- ValueMappingMethod
public static class ValueMappingMethod.Builder extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description private MappingBuilderContextctxprivate EnumMappingOptionsenumMappingprivate booleanenumTransformationIllegalReportedprivate ValueMappingMethod.EnumTransformationStrategyInvokerenumTransformationInvokerprivate Methodmethodprivate ValueMappingMethod.ValueMappingsvalueMappings
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
-
-
-
Field Detail
-
method
private Method method
-
ctx
private MappingBuilderContext ctx
-
valueMappings
private ValueMappingMethod.ValueMappings valueMappings
-
enumMapping
private EnumMappingOptions enumMapping
-
enumTransformationInvoker
private ValueMappingMethod.EnumTransformationStrategyInvoker enumTransformationInvoker
-
enumTransformationIllegalReported
private boolean enumTransformationIllegalReported
-
-
Method Detail
-
mappingContext
public ValueMappingMethod.Builder mappingContext(MappingBuilderContext mappingContext)
-
method
public ValueMappingMethod.Builder method(Method sourceMethod)
-
valueMappings
public ValueMappingMethod.Builder valueMappings(java.util.List<ValueMappingOptions> valueMappings)
-
enumMapping
public ValueMappingMethod.Builder enumMapping(EnumMappingOptions enumMapping)
-
build
public ValueMappingMethod build()
-
initializeEnumTransformationStrategy
private void initializeEnumTransformationStrategy()
-
transform
private java.lang.String transform(java.lang.String source)
-
enumToEnumMapping
private java.util.List<ValueMappingMethod.MappingEntry> enumToEnumMapping(Method method, Type sourceType, Type targetType)
-
enumToStringMapping
private java.util.List<ValueMappingMethod.MappingEntry> enumToStringMapping(Method method, Type sourceType)
-
stringToEnumMapping
private java.util.List<ValueMappingMethod.MappingEntry> stringToEnumMapping(Method method, Type targetType)
-
getEnumConstant
private java.lang.String getEnumConstant(javax.lang.model.element.TypeElement typeElement, java.lang.String enumConstant)
-
getSelectionParameters
private SelectionParameters getSelectionParameters(Method method, TypeUtils typeUtils)
-
reportErrorIfMappedSourceEnumConstantsDontExist
private boolean reportErrorIfMappedSourceEnumConstantsDontExist(Method method, Type sourceType)
-
reportErrorIfSourceEnumConstantsContainsAnyRemaining
private boolean reportErrorIfSourceEnumConstantsContainsAnyRemaining(Method method)
-
reportWarningIfAnyRemainingOrAnyUnMappedMissing
private void reportWarningIfAnyRemainingOrAnyUnMappedMissing(Method method)
-
reportErrorIfMappedTargetEnumConstantsDontExist
private boolean reportErrorIfMappedTargetEnumConstantsDontExist(Method method, Type targetType)
-
determineUnexpectedValueMappingException
private Type determineUnexpectedValueMappingException()
-
-