public class MappingBuilderContext extends Object
The context provides:
Modifier and Type | Class and Description |
---|---|
static interface |
MappingBuilderContext.MappingResolver
Resolves the most suitable way for mapping an element (property, iterable element etc.) from source to target.
|
Constructor and Description |
---|
MappingBuilderContext(TypeFactory typeFactory,
Elements elementUtils,
Types typeUtils,
FormattingMessager messager,
AccessorNamingUtils accessorNaming,
EnumMappingStrategy enumMappingStrategy,
Map<String,EnumTransformationStrategy> enumTransformationStrategies,
Options options,
MappingBuilderContext.MappingResolver mappingResolver,
TypeElement mapper,
List<SourceMethod> sourceModel,
List<MapperReference> mapperReferences) |
Modifier and Type | Method and Description |
---|---|
boolean |
canGenerateAutoSubMappingBetween(Type sourceType,
Type targetType) |
AccessorNamingUtils |
getAccessorNaming() |
Elements |
getElementUtils() |
EnumMappingStrategy |
getEnumMappingStrategy() |
Map<String,EnumTransformationStrategy> |
getEnumTransformationStrategies() |
MappingMethod |
getExistingMappingMethod(MappingMethod newMappingMethod) |
Map<ForgedMethod,ForgedMethod> |
getForgedMethodsUnderCreation()
Returns a map which is used to track which forged methods are under creation.
|
List<MapperReference> |
getMapperReferences() |
TypeElement |
getMapperTypeElement() |
MappingBuilderContext.MappingResolver |
getMappingResolver() |
List<MappingMethod> |
getMappingsToGenerate() |
FormattingMessager |
getMessager() |
Options |
getOptions() |
List<String> |
getReservedNames() |
List<SourceMethod> |
getSourceModel() |
TypeFactory |
getTypeFactory() |
Types |
getTypeUtils() |
Set<SupportingMappingMethod> |
getUsedSupportedMappings() |
boolean |
isErroneous() |
public MappingBuilderContext(TypeFactory typeFactory, Elements elementUtils, Types typeUtils, FormattingMessager messager, AccessorNamingUtils accessorNaming, EnumMappingStrategy enumMappingStrategy, Map<String,EnumTransformationStrategy> enumTransformationStrategies, Options options, MappingBuilderContext.MappingResolver mappingResolver, TypeElement mapper, List<SourceMethod> sourceModel, List<MapperReference> mapperReferences)
public Map<ForgedMethod,ForgedMethod> getForgedMethodsUnderCreation()
public TypeElement getMapperTypeElement()
public List<SourceMethod> getSourceModel()
public List<MapperReference> getMapperReferences()
public TypeFactory getTypeFactory()
public Elements getElementUtils()
public Types getTypeUtils()
public FormattingMessager getMessager()
public AccessorNamingUtils getAccessorNaming()
public EnumMappingStrategy getEnumMappingStrategy()
public Map<String,EnumTransformationStrategy> getEnumTransformationStrategies()
public Options getOptions()
public MappingBuilderContext.MappingResolver getMappingResolver()
public List<MappingMethod> getMappingsToGenerate()
public MappingMethod getExistingMappingMethod(MappingMethod newMappingMethod)
public Set<SupportingMappingMethod> getUsedSupportedMappings()
public boolean canGenerateAutoSubMappingBetween(Type sourceType, Type targetType)
sourceType
- from which an automatic sub-mapping needs to be generatedtargetType
- to which an automatic sub-mapping needs to be generatedtrue
if MapStruct is allowed to try and generate an automatic sub-mapping between the
source and target Type
public boolean isErroneous()
Copyright © 2012-2021 MapStruct Authors; All rights reserved. Released under the Apache Software License 2.0.