| Package | Description |
|---|---|
| org.mapstruct.ap.conversion |
Provides built-in conversions between primitive and wrapper types, strings, dates etc.
|
| org.mapstruct.ap.model |
Meta-model of mapper types, their methods, mappings between properties etc.
|
| org.mapstruct.ap.model.assignment |
Meta-model of assignments.
|
| org.mapstruct.ap.model.common |
Contains types which are shared between the intermediary mapping method model ("source model") and the mapper model.
|
| org.mapstruct.ap.model.source |
Intermediary representation of mapping methods as retrieved from via the annotation processing API.
|
| org.mapstruct.ap.model.source.builtin |
Contains "built-in methods" which may be added as private methods to a generated mapper.
|
| org.mapstruct.ap.model.source.selector |
Provides strategies for selecting a matching mapping or factory method when mapping from one attribute to another
or instantiating the target type of a mapping method, respectively.
|
| org.mapstruct.ap.processor.creation |
Contains all helper classes for the
MapperCreationProcessor |
| Modifier and Type | Method and Description |
|---|---|
protected Set<Type> |
JodaDateTimeToCalendarConversion.getFromConversionImportTypes(ConversionContext conversionContext) |
protected Set<Type> |
BigDecimalToStringConversion.getFromConversionImportTypes(ConversionContext conversionContext) |
protected Set<Type> |
BigDecimalToWrapperConversion.getFromConversionImportTypes(ConversionContext conversionContext) |
protected Set<Type> |
BigIntegerToWrapperConversion.getFromConversionImportTypes(ConversionContext conversionContext) |
protected Set<Type> |
BigIntegerToStringConversion.getFromConversionImportTypes(ConversionContext conversionContext) |
protected Set<Type> |
EnumStringConversion.getFromConversionImportTypes(ConversionContext conversionContext) |
protected Set<Type> |
BigDecimalToPrimitiveConversion.getFromConversionImportTypes(ConversionContext conversionContext) |
protected Set<Type> |
AbstractJavaTimeToStringConversion.getFromConversionImportTypes(ConversionContext conversionContext) |
protected Set<Type> |
BigIntegerToPrimitiveConversion.getFromConversionImportTypes(ConversionContext conversionContext) |
protected Set<Type> |
BigDecimalToBigIntegerConversion.getFromConversionImportTypes(ConversionContext conversionContext) |
protected Set<Type> |
SimpleConversion.getFromConversionImportTypes(ConversionContext conversionContext)
Returns a set with imported types of the "from" conversion.
|
protected Set<Type> |
AbstractJodaTypeToStringConversion.getFromConversionImportTypes(ConversionContext conversionContext) |
protected Set<Type> |
JodaTimeToDateConversion.getFromConversionImportTypes(ConversionContext conversionContext) |
protected Set<Type> |
JodaDateTimeToCalendarConversion.getToConversionImportTypes(ConversionContext conversionContext) |
protected Set<Type> |
AbstractJavaTimeToStringConversion.getToConversionImportTypes(ConversionContext conversionContext) |
protected Set<Type> |
SimpleConversion.getToConversionImportTypes(ConversionContext conversionContext)
Returns a set with imported types of the "to" conversion.
|
protected Set<Type> |
AbstractJodaTypeToStringConversion.getToConversionImportTypes(ConversionContext conversionContext) |
| Modifier and Type | Method and Description |
|---|---|
ConversionProvider |
Conversions.getConversion(Type sourceType,
Type targetType) |
| Modifier and Type | Method and Description |
|---|---|
Type |
IterableMappingMethod.getResultElementType() |
Type |
BeanMappingMethod.getResultType() |
Type |
MappingMethod.getResultType() |
Type |
MappingMethod.getReturnType() |
Type |
MethodReference.getSingleSourceParameterType() |
Type |
IterableMappingMethod.getSourceElementType() |
Type |
PropertyMapping.getTargetType() |
Type |
Annotation.getType() |
Type |
Field.getType()
Returns the type of this field.
|
| Modifier and Type | Method and Description |
|---|---|
List<Type> |
TypeConversion.getExceptionTypes() |
List<Type> |
MethodReference.getExceptionTypes() |
List<Type> |
Direct.getExceptionTypes() |
Set<Type> |
TypeConversion.getImportTypes() |
Set<Type> |
MethodReference.getImportTypes() |
Set<Type> |
BeanMappingMethod.getImportTypes() |
SortedSet<Type> |
Decorator.getImportTypes() |
Set<Type> |
VirtualMappingMethod.getImportTypes() |
Set<Type> |
PropertyMapping.getImportTypes() |
Set<Type> |
IterableMappingMethod.getImportTypes() |
Set<Type> |
Direct.getImportTypes() |
Set<Type> |
Annotation.getImportTypes() |
Set<Type> |
DefaultMapperReference.getImportTypes() |
SortedSet<Type> |
GeneratedType.getImportTypes() |
Set<Type> |
DecoratorConstructor.getImportTypes() |
Set<Type> |
AnnotationMapperReference.getImportTypes() |
Set<Type> |
MapMappingMethod.getImportTypes() |
Set<Type> |
Field.getImportTypes() |
Set<Type> |
MappingMethod.getImportTypes() |
Set<Type> |
NestedPropertyMappingMethod.getImportTypes() |
List<Type> |
MappingMethod.getThrownTypes() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
GeneratedType.addWithDependents(Collection<Type> collection,
Type typeToAdd) |
static Assignment |
AssignmentFactory.createMethodReference(Method method,
MapperReference declaringMapper,
Type targetType) |
MethodReference |
MappingBuilderContext.MappingResolver.getFactoryMethod(Method mappingMethod,
Type target,
List<TypeMirror> qualifiers,
TypeMirror resultType)
returns a no arg factory method
|
static DefaultMapperReference |
DefaultMapperReference.getInstance(Type type,
boolean isAnnotatedMapper,
TypeFactory typeFactory,
List<String> otherMapperReferences) |
Assignment |
MappingBuilderContext.MappingResolver.getTargetAssignment(Method mappingMethod,
String mappedElement,
Type sourceType,
Type targetType,
String targetPropertyName,
String dateFormat,
List<TypeMirror> qualifiers,
TypeMirror resultType,
String sourceReference,
boolean preferUpdateMethods)
returns a parameter assignment
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
GeneratedType.addWithDependents(Collection<Type> collection,
Type typeToAdd) |
static Assignment |
AssignmentFactory.createTypeConversion(Set<Type> importTypes,
List<Type> exceptionTypes,
String expression) |
static Assignment |
AssignmentFactory.createTypeConversion(Set<Type> importTypes,
List<Type> exceptionTypes,
String expression) |
Mapper.Builder |
Mapper.Builder.extraImports(SortedSet<Type> extraImportedTypes) |
| Constructor and Description |
|---|
Annotation(Type type) |
AnnotationMapperReference(Type type,
String variableName,
Annotation annotation,
boolean isUsed) |
Field(Type type,
String variableName) |
Field(Type type,
String variableName,
boolean used) |
MapperReference(Type type,
String variableName) |
MapperReference(Type type,
String variableName,
boolean isUsed) |
MethodReference(Method method,
MapperReference declaringMapper,
Type targetType)
Creates a new reference to the given method.
|
| Constructor and Description |
|---|
GeneratedType(TypeFactory typeFactory,
String packageName,
String name,
String superClassName,
String interfaceName,
List<MappingMethod> methods,
List<? extends Field> fields,
Options options,
VersionInformation versionInformation,
Accessibility accessibility,
SortedSet<Type> extraImportedTypes,
Constructor constructor) |
| Modifier and Type | Method and Description |
|---|---|
Type |
AdderWrapper.getSourceType() |
| Modifier and Type | Method and Description |
|---|---|
List<Type> |
GetterWrapperForCollectionsAndMaps.getExceptionTypes() |
List<Type> |
Assignment.getExceptionTypes()
returns all types exception types thrown by this assignment.
|
List<Type> |
SetterWrapper.getExceptionTypes() |
List<Type> |
AssignmentWrapper.getExceptionTypes() |
List<Type> |
UpdateWrapper.getExceptionTypes() |
List<Type> |
LocalVarWrapper.getExceptionTypes() |
List<Type> |
AdderWrapper.getExceptionTypes() |
Set<Type> |
GetterWrapperForCollectionsAndMaps.getImportTypes() |
Set<Type> |
Assignment.getImportTypes()
returns all types required as import by the assignment statement.
|
Set<Type> |
ArrayCopyWrapper.getImportTypes() |
Set<Type> |
AssignmentWrapper.getImportTypes() |
Set<Type> |
UpdateWrapper.getImportTypes() |
Set<Type> |
NewCollectionOrMapWrapper.getImportTypes() |
Set<Type> |
SetterWrapperForCollectionsAndMaps.getImportTypes() |
Set<Type> |
AdderWrapper.getImportTypes() |
| Constructor and Description |
|---|
AdderWrapper(Assignment decoratedAssignment,
List<Type> exceptionTypesToExclude,
String sourceReference,
Type sourceType) |
ArrayCopyWrapper(Assignment decoratedAssignment,
String targetPropertyName,
Type arraysType,
Type targetType,
Collection<String> existingVariableNames) |
GetterWrapperForCollectionsAndMaps(Assignment decoratedAssignment,
List<Type> exceptionTypesToExclude,
Type targetType,
Collection<String> existingVariableNames) |
UpdateWrapper(Assignment decoratedAssignment,
List<Type> exceptionTypesToExclude,
Type targetType,
Assignment factoryMethod) |
| Constructor and Description |
|---|
AdderWrapper(Assignment decoratedAssignment,
List<Type> exceptionTypesToExclude,
String sourceReference,
Type sourceType) |
GetterWrapperForCollectionsAndMaps(Assignment decoratedAssignment,
List<Type> exceptionTypesToExclude,
Type targetType,
Collection<String> existingVariableNames) |
LocalVarWrapper(Assignment decoratedAssignment,
List<Type> exceptionTypesToExclude) |
NewCollectionOrMapWrapper(Assignment decoratedAssignment,
Set<Type> implementationTypes) |
SetterWrapper(Assignment decoratedAssignment,
List<Type> exceptionTypesToExclude) |
UpdateWrapper(Assignment decoratedAssignment,
List<Type> exceptionTypesToExclude,
Type targetType,
Assignment factoryMethod) |
| Modifier and Type | Method and Description |
|---|---|
Type |
TypeFactory.classTypeOf(Type type)
Returns the Type that represents the declared Class type of the given type.
|
Type |
Type.erasure() |
Type |
Type.getComponentType() |
Type |
Type.getImplementationType()
Returns the implementation type to be instantiated in case this type is an interface iterable, collection or map
type.
|
Type |
TypeFactory.getReturnType(ExecutableElement method) |
Type |
TypeFactory.getReturnType(ExecutableType method) |
Type |
DefaultConversionContext.getTargetType() |
Type |
ConversionContext.getTargetType()
Returns the target type of this conversion.
|
Type |
Parameter.getType() |
Type |
TypeFactory.getType(Class<?> type) |
Type |
TypeFactory.getType(String canonicalName) |
Type |
TypeFactory.getType(TypeElement typeElement) |
Type |
TypeFactory.getType(TypeMirror mirror) |
| Modifier and Type | Method and Description |
|---|---|
Set<Type> |
Parameter.getImportTypes() |
abstract Set<Type> |
ModelElement.getImportTypes()
Returns a set containing those
Types referenced by this model element for which an import statement needs
to be declared. |
Set<Type> |
Type.getImportTypes() |
List<Type> |
TypeFactory.getThrownTypes(ExecutableElement method) |
List<Type> |
TypeFactory.getThrownTypes(ExecutableType method) |
List<Type> |
Type.getTypeParameters() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
Type.canAccess(Type type,
ExecutableElement method)
Whether this type can access the given method declared on the given type.
|
Type |
TypeFactory.classTypeOf(Type type)
Returns the Type that represents the declared Class type of the given type.
|
int |
Type.compareTo(Type o) |
int |
Type.distanceTo(Type assignableOther)
Returns the length of the shortest path in the type hierarchy between this type and the specified other type.
|
boolean |
Type.isAssignableTo(Type other)
Whether this type is assignable to the given other type.
|
| Constructor and Description |
|---|
DefaultConversionContext(TypeFactory typeFactory,
FormattingMessager messager,
Type sourceType,
Type targetType,
String dateFormat) |
Parameter(String name,
Type type) |
Parameter(String name,
Type type,
boolean mappingTarget,
boolean targetType) |
Type(Types typeUtils,
Elements elementUtils,
TypeFactory typeFactory,
TypeMirror typeMirror,
TypeElement typeElement,
List<Type> typeParameters,
Type implementationType,
Type componentType,
String packageName,
String name,
String qualifiedName,
boolean isInterface,
boolean isEnumType,
boolean isIterableType,
boolean isCollectionType,
boolean isMapType,
boolean isImported) |
| Constructor and Description |
|---|
Type(Types typeUtils,
Elements elementUtils,
TypeFactory typeFactory,
TypeMirror typeMirror,
TypeElement typeElement,
List<Type> typeParameters,
Type implementationType,
Type componentType,
String packageName,
String name,
String qualifiedName,
boolean isInterface,
boolean isEnumType,
boolean isIterableType,
boolean isCollectionType,
boolean isMapType,
boolean isImported) |
| Modifier and Type | Method and Description |
|---|---|
Type |
ForgedMethod.getDeclaringMapper() |
Type |
SourceMethod.getDeclaringMapper()
Returns the mapper type declaring this method if it is not declared by the mapper interface currently processed
but by another mapper imported via
Mapper#users(). |
Type |
Method.getDeclaringMapper()
Returns the mapper type declaring this method if it is not declared by the mapper interface currently processed
but by another mapper imported via
Mapper#users(). |
Type |
ForgedMethod.getResultType() |
Type |
SourceMethod.getResultType() |
Type |
Method.getResultType()
Returns the type of the result.
|
Type |
ForgedMethod.getReturnType() |
Type |
SourceMethod.getReturnType()
Returns the return type of the method
|
Type |
Method.getReturnType()
Returns the return type of the method
|
Type |
SourceReference.PropertyEntry.getType() |
| Modifier and Type | Method and Description |
|---|---|
List<Type> |
ForgedMethod.getThrownTypes() |
List<Type> |
SourceMethod.getThrownTypes() |
List<Type> |
Method.getThrownTypes()
Returns all exceptions thrown by this method
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
ForgedMethod.matches(Type sourceTypes,
Type targetType) |
boolean |
SourceMethod.matches(Type sourceType,
Type targetType)
Checks whether the provided sourceType and provided targetType match with the parameter respectively return type
of the method.
|
boolean |
Method.matches(Type sourceType,
Type targetType)
Checks whether the provided sourceType and provided targetType match with the parameter respectively return type
of the method.
|
SourceMethod.Builder |
SourceMethod.Builder.setDeclaringMapper(Type declaringMapper) |
SourceMethod.Builder |
SourceMethod.Builder.setReturnType(Type returnType) |
SourceReference.BuilderFromProperty |
SourceReference.BuilderFromProperty.type(Type type) |
| Modifier and Type | Method and Description |
|---|---|
SourceMethod.Builder |
SourceMethod.Builder.setExceptionTypes(List<Type> exceptionTypes) |
| Constructor and Description |
|---|
ForgedMethod(String name,
Type sourceType,
Type targetType,
ExecutableElement positionHintElement)
Creates a new forged method with the given name.
|
PropertyEntry(String name,
ExecutableElement accessor,
Type type) |
| Modifier and Type | Method and Description |
|---|---|
Type |
BuiltInMethod.getDeclaringMapper()
Returns the mapper type declaring this method if it is not declared by the mapper interface currently processed
but by another mapper imported via
Mapper#users(). |
Type |
BuiltInMethod.getResultType() |
Type |
XmlGregorianCalendarToCalendar.getReturnType() |
Type |
CalendarToXmlGregorianCalendar.getReturnType() |
Type |
XmlGregorianCalendarToDate.getReturnType() |
Type |
CalendarToZonedDateTime.getReturnType() |
Type |
XmlGregorianCalendarToString.getReturnType() |
Type |
JaxbElemToValue.getReturnType() |
Type |
ZonedDateTimeToCalendar.getReturnType() |
Type |
DateToXmlGregorianCalendar.getReturnType() |
Type |
StringToXmlGregorianCalendar.getReturnType() |
| Modifier and Type | Method and Description |
|---|---|
Set<Type> |
XmlGregorianCalendarToCalendar.getImportTypes() |
Set<Type> |
BuiltInMethod.getImportTypes()
Returns the types used by this method for which import statements need to be generated.
|
Set<Type> |
CalendarToXmlGregorianCalendar.getImportTypes() |
Set<Type> |
XmlGregorianCalendarToDate.getImportTypes() |
Set<Type> |
CalendarToZonedDateTime.getImportTypes() |
Set<Type> |
XmlGregorianCalendarToString.getImportTypes() |
Set<Type> |
JaxbElemToValue.getImportTypes() |
Set<Type> |
ZonedDateTimeToCalendar.getImportTypes() |
Set<Type> |
DateToXmlGregorianCalendar.getImportTypes() |
Set<Type> |
StringToXmlGregorianCalendar.getImportTypes() |
List<Type> |
BuiltInMethod.getThrownTypes() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
BuiltInMethod.doTypeVarsMatch(Type parameter,
Type returnType)
Analyzes the Java Generic type variables in the parameter do match the type variables in the build in method
same goes for the returnType.
|
boolean |
JaxbElemToValue.doTypeVarsMatch(Type sourceType,
Type targetType) |
boolean |
BuiltInMethod.matches(Type sourceType,
Type targetType)
Checks whether the provided sourceType and provided targetType match with the parameter respectively return type
of the method.
|
| Modifier and Type | Method and Description |
|---|---|
<T extends Method> |
MethodSelector.getMatchingMethods(Method mappingMethod,
List<T> methods,
Type sourceType,
Type targetType,
SelectionCriteria criteria)
Selects those methods which match the given types and other criteria
|
<T extends Method> |
QualifierSelector.getMatchingMethods(Method mappingMethod,
List<T> methods,
Type sourceType,
Type targetType,
SelectionCriteria criteria) |
<T extends Method> |
CreateOrUpdateSelector.getMatchingMethods(Method mappingMethod,
List<T> methods,
Type sourceType,
Type targetType,
SelectionCriteria criteria) |
<T extends Method> |
TargetTypeSelector.getMatchingMethods(Method mappingMethod,
List<T> methods,
Type sourceType,
Type targetType,
SelectionCriteria criteria) |
<T extends Method> |
MethodSelectors.getMatchingMethods(Method mappingMethod,
List<T> methods,
Type sourceType,
Type targetType,
SelectionCriteria criteria) |
<T extends Method> |
InheritanceSelector.getMatchingMethods(Method mappingMethod,
List<T> methods,
Type sourceType,
Type targetType,
SelectionCriteria criteria) |
<T extends Method> |
XmlElementDeclSelector.getMatchingMethods(Method mappingMethod,
List<T> methods,
Type sourceType,
Type targetType,
SelectionCriteria criteria) |
<T extends Method> |
TypeSelector.getMatchingMethods(Method mappingMethod,
List<T> methods,
Type sourceType,
Type targetType,
SelectionCriteria criteria) |
| Modifier and Type | Method and Description |
|---|---|
MethodReference |
MappingResolverImpl.getFactoryMethod(Method mappingMethod,
Type targetType,
List<TypeMirror> qualifiers,
TypeMirror resultType) |
Assignment |
MappingResolverImpl.getTargetAssignment(Method mappingMethod,
String mappedElement,
Type sourceType,
Type targetType,
String targetPropertyName,
String dateFormat,
List<TypeMirror> qualifiers,
TypeMirror resultType,
String sourceReference,
boolean preferUpdateMapping) |
Copyright © 2012-2015. All Rights Reserved.