| 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 |
MappingMethod.getResultType() |
Type |
MappingMethod.getReturnType() |
Type |
MethodReference.getSingleSourceParameterType() |
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() |
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 |
|---|---|
static MethodReference |
AssignmentFactory.createFactoryMethod(Type returnType,
MappingBuilderContext ctx) |
static Assignment |
AssignmentFactory.createMethodReference(Method method,
MapperReference declaringMapper,
Type targetType) |
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,
String sourceReference)
returns a parameter assignment
|
| Modifier and Type | Method and Description |
|---|---|
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) |
Field(Type type,
String variableName) |
MapperReference(Type type,
String variableName) |
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 ModelElement> fields,
boolean suppressGeneratorTimestamp,
Accessibility accessibility,
SortedSet<Type> extraImportedTypes) |
| Modifier and Type | Method and Description |
|---|---|
Type |
AdderWrapper.getSourceType() |
| Modifier and Type | Method and Description |
|---|---|
List<Type> |
Assignment.getExceptionTypes()
returns all types exception types thrown by this assignment.
|
List<Type> |
SetterWrapper.getExceptionTypes() |
List<Type> |
AssignmentWrapper.getExceptionTypes() |
List<Type> |
LocalVarWrapper.getExceptionTypes() |
List<Type> |
AdderWrapper.getExceptionTypes() |
Set<Type> |
Assignment.getImportTypes()
returns all types required as import by the assignment statement.
|
Set<Type> |
SetterCollectionOrMapWrapper.getImportTypes() |
Set<Type> |
AssignmentWrapper.getImportTypes() |
Set<Type> |
NewCollectionOrMapWrapper.getImportTypes() |
Set<Type> |
AdderWrapper.getImportTypes() |
| Constructor and Description |
|---|
AdderWrapper(Assignment decoratedAssignment,
List<Type> exceptionTypesToExclude,
String sourceReference,
Type sourceType) |
| Constructor and Description |
|---|
AdderWrapper(Assignment decoratedAssignment,
List<Type> exceptionTypesToExclude,
String sourceReference,
Type sourceType) |
LocalVarWrapper(Assignment decoratedAssignment,
List<Type> exceptionTypesToExclude) |
NewCollectionOrMapWrapper(Assignment decoratedAssignment,
Set<Type> implementationTypes) |
SetterWrapper(Assignment decoratedAssignment,
List<Type> exceptionTypesToExclude) |
| 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.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 |
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> |
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.
|
ExecutableElement |
Type.getAdderForType(Type collectionProperty,
String pluralPropertyName)
Tries to find an addMethod in this type for given collection property in this type.
|
boolean |
Type.isAssignableTo(Type other)
Whether this type is assignable to the given other type.
|
| Constructor and Description |
|---|
DefaultConversionContext(TypeFactory typeFactory,
Type targetType,
String format) |
Parameter(String name,
Type type) |
Parameter(String name,
Type type,
boolean mappingTarget,
boolean targetType) |
Type(Types typeUtils,
Elements elementUtils,
TypeMirror typeMirror,
TypeElement typeElement,
List<Type> typeParameters,
Type implementationType,
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,
TypeMirror typeMirror,
TypeElement typeElement,
List<Type> typeParameters,
Type implementationType,
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 |
|---|---|
static SourceMethod |
SourceMethod.forFactoryMethod(Type declaringMapper,
ExecutableElement executable,
Type returnType,
List<Type> exceptionTypes,
Types typeUtils) |
static SourceMethod |
SourceMethod.forMethodRequiringImplementation(ExecutableElement executable,
List<Parameter> parameters,
Type returnType,
List<Type> exceptionTypes,
Map<String,List<Mapping>> mappings,
IterableMapping iterableMapping,
MapMapping mapMapping,
Types typeUtils,
Messager messager,
TypeFactory typeFactory) |
static SourceMethod |
SourceMethod.forReferencedMethod(Type declaringMapper,
ExecutableElement executable,
List<Parameter> parameters,
Type returnType,
List<Type> exceptionTypes,
Types typeUtils) |
boolean |
ForgedMethod.matches(List<Type> sourceTypes,
Type targetType) |
boolean |
SourceMethod.matches(List<Type> sourceTypes,
Type targetType)
Checks whether the provided sourceType and provided targetType match with the parameter respectively return type
of the method.
|
boolean |
Method.matches(List<Type> sourceTypes,
Type targetType)
Checks whether the provided sourceType and provided targetType match with the parameter respectively return type
of the method.
|
SourceReference.BuilderFromProperty |
SourceReference.BuilderFromProperty.type(Type type) |
| Modifier and Type | Method and Description |
|---|---|
static SourceMethod |
SourceMethod.forFactoryMethod(Type declaringMapper,
ExecutableElement executable,
Type returnType,
List<Type> exceptionTypes,
Types typeUtils) |
static SourceMethod |
SourceMethod.forMethodRequiringImplementation(ExecutableElement executable,
List<Parameter> parameters,
Type returnType,
List<Type> exceptionTypes,
Map<String,List<Mapping>> mappings,
IterableMapping iterableMapping,
MapMapping mapMapping,
Types typeUtils,
Messager messager,
TypeFactory typeFactory) |
static SourceMethod |
SourceMethod.forReferencedMethod(Type declaringMapper,
ExecutableElement executable,
List<Parameter> parameters,
Type returnType,
List<Type> exceptionTypes,
Types typeUtils) |
boolean |
ForgedMethod.matches(List<Type> sourceTypes,
Type targetType) |
boolean |
SourceMethod.matches(List<Type> sourceTypes,
Type targetType)
Checks whether the provided sourceType and provided targetType match with the parameter respectively return type
of the method.
|
boolean |
Method.matches(List<Type> sourceTypes,
Type targetType)
Checks whether the provided sourceType and provided targetType match with the parameter respectively return type
of the method.
|
| Constructor and Description |
|---|
ForgedMethod(String name,
Type sourceType,
Type targetType,
ExecutableElement positionHintElement)
Creates a new forged method with the given name.
|
ForgedMethod(Type sourceType,
Type targetType,
ExecutableElement positionHintElement)
Creates a new forged method.
|
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 |
ListOfJaxbElemToListOfValue.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> |
ListOfJaxbElemToListOfValue.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 |
ListOfJaxbElemToListOfValue.doTypeVarsMatch(Type sourceType,
Type targetType) |
boolean |
BuiltInMethod.matches(List<Type> sourceTypes,
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 |
|---|---|
boolean |
BuiltInMethod.matches(List<Type> sourceTypes,
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 |
|---|---|
static List<Type> |
MethodSelectors.getParameterTypes(TypeFactory typeFactory,
List<Parameter> parameters,
Type sourceType,
Type returnType) |
| Modifier and Type | Method and Description |
|---|---|
<T extends Method> |
MethodSelector.getMatchingMethods(Method mappingMethod,
List<T> methods,
Type parameterType,
Type returnType,
List<TypeMirror> qualifiers,
String targetPropertyName)
Selects those methods which match the given types and other criteria
|
<T extends Method> |
QualifierSelector.getMatchingMethods(Method mappingMethod,
List<T> methods,
Type parameterType,
Type returnType,
List<TypeMirror> qualifiers,
String targetPropertyName) |
<T extends Method> |
MethodSelectors.getMatchingMethods(Method mappingMethod,
List<T> methods,
Type parameterType,
Type returnType,
List<TypeMirror> qualifiers,
String targetPropertyName) |
<T extends Method> |
InheritanceSelector.getMatchingMethods(Method mappingMethod,
List<T> methods,
Type parameterType,
Type returnType,
List<TypeMirror> qualifiers,
String targetPropertyName) |
<T extends Method> |
XmlElementDeclSelector.getMatchingMethods(Method mappingMethod,
List<T> methods,
Type parameterType,
Type returnType,
List<TypeMirror> qualifiers,
String targetPropertyName) |
<T extends Method> |
TypeSelector.getMatchingMethods(Method mappingMethod,
List<T> methods,
Type parameterType,
Type returnType,
List<TypeMirror> qualifiers,
String targetPropertyName) |
static List<Type> |
MethodSelectors.getParameterTypes(TypeFactory typeFactory,
List<Parameter> parameters,
Type sourceType,
Type returnType) |
| Modifier and Type | Method and Description |
|---|---|
Assignment |
MappingResolverImpl.getTargetAssignment(Method mappingMethod,
String mappedElement,
Type sourceType,
Type targetType,
String targetPropertyName,
String dateFormat,
List<TypeMirror> qualifiers,
String sourceReference)
returns a parameter assignment
|
Copyright © 2012-2014. All Rights Reserved.