| 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 java.util.Set<Type> |
JodaDateTimeToCalendarConversion.getFromConversionImportTypes(ConversionContext conversionContext) |
protected java.util.Set<Type> |
BigDecimalToStringConversion.getFromConversionImportTypes(ConversionContext conversionContext) |
protected java.util.Set<Type> |
BigDecimalToWrapperConversion.getFromConversionImportTypes(ConversionContext conversionContext) |
protected java.util.Set<Type> |
BigIntegerToWrapperConversion.getFromConversionImportTypes(ConversionContext conversionContext) |
protected java.util.Set<Type> |
BigIntegerToStringConversion.getFromConversionImportTypes(ConversionContext conversionContext) |
protected java.util.Set<Type> |
EnumStringConversion.getFromConversionImportTypes(ConversionContext conversionContext) |
protected java.util.Set<Type> |
BigDecimalToPrimitiveConversion.getFromConversionImportTypes(ConversionContext conversionContext) |
protected java.util.Set<Type> |
BigIntegerToPrimitiveConversion.getFromConversionImportTypes(ConversionContext conversionContext) |
protected java.util.Set<Type> |
BigDecimalToBigIntegerConversion.getFromConversionImportTypes(ConversionContext conversionContext) |
protected java.util.Set<Type> |
SimpleConversion.getFromConversionImportTypes(ConversionContext conversionContext)
Returns a set with imported types of the "from" conversion.
|
protected java.util.Set<Type> |
AbstractJodaTypeToStringConversion.getFromConversionImportTypes(ConversionContext conversionContext) |
protected java.util.Set<Type> |
JodaTimeToDateConversion.getFromConversionImportTypes(ConversionContext conversionContext) |
protected java.util.Set<Type> |
JodaDateTimeToCalendarConversion.getToConversionImportTypes(ConversionContext conversionContext) |
protected java.util.Set<Type> |
SimpleConversion.getToConversionImportTypes(ConversionContext conversionContext)
Returns a set with imported types of the "to" conversion.
|
protected java.util.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 |
PropertyMapping.getTargetType() |
Type |
Annotation.getType() |
Type |
Field.getType()
Returns the type of this field.
|
| Modifier and Type | Method and Description |
|---|---|
java.util.List<Type> |
Assignment.getExceptionTypes()
returns all types exception types thrown by this assignment.
|
java.util.List<Type> |
FactoryMethod.getExceptionTypes() |
java.util.Set<Type> |
Assignment.getImportTypes()
returns all types required as import by the assignment statement.
|
java.util.Set<Type> |
BeanMappingMethod.getImportTypes() |
java.util.Set<Type> |
VirtualMappingMethod.getImportTypes() |
java.util.Set<Type> |
PropertyMapping.getImportTypes() |
java.util.Set<Type> |
IterableMappingMethod.getImportTypes() |
java.util.Set<Type> |
Annotation.getImportTypes() |
java.util.Set<Type> |
DefaultMapperReference.getImportTypes() |
java.util.SortedSet<Type> |
GeneratedType.getImportTypes() |
java.util.Set<Type> |
DecoratorConstructor.getImportTypes() |
java.util.Set<Type> |
AnnotationMapperReference.getImportTypes() |
java.util.Set<Type> |
MapMappingMethod.getImportTypes() |
java.util.Set<Type> |
Field.getImportTypes() |
java.util.Set<Type> |
MappingMethod.getImportTypes() |
java.util.List<Type> |
MappingMethod.getThrownTypes() |
| Modifier and Type | Method and Description |
|---|---|
static DefaultMapperReference |
DefaultMapperReference.getInstance(Type type,
boolean isAnnotatedMapper,
TypeFactory typeFactory,
java.util.List<java.lang.String> otherMapperReferences) |
| Constructor and Description |
|---|
Annotation(Type type) |
AnnotationMapperReference(Type type,
java.lang.String variableName,
Annotation annotation) |
Field(Type type,
java.lang.String variableName) |
MapperReference(Type type,
java.lang.String variableName) |
PropertyMapping(java.lang.String sourceBeanName,
java.lang.String targetAccessorName,
Type targetType,
Assignment assignment) |
PropertyMapping(java.lang.String targetAccessorName,
Type targetType,
Assignment propertyAssignment) |
| Modifier and Type | Method and Description |
|---|---|
Type |
MethodReference.getSingleSourceParameterType() |
Type |
AdderWrapper.getSourceType() |
| Modifier and Type | Method and Description |
|---|---|
java.util.List<Type> |
TypeConversion.getExceptionTypes() |
java.util.List<Type> |
MethodReference.getExceptionTypes() |
java.util.List<Type> |
SetterWrapper.getExceptionTypes() |
java.util.List<Type> |
AssignmentWrapper.getExceptionTypes() |
java.util.List<Type> |
Direct.getExceptionTypes() |
java.util.List<Type> |
LocalVarWrapper.getExceptionTypes() |
java.util.List<Type> |
AdderWrapper.getExceptionTypes() |
java.util.Set<Type> |
TypeConversion.getImportTypes() |
java.util.Set<Type> |
MethodReference.getImportTypes() |
java.util.Set<Type> |
SetterCollectionOrMapWrapper.getImportTypes() |
java.util.Set<Type> |
AssignmentWrapper.getImportTypes() |
java.util.Set<Type> |
Direct.getImportTypes() |
java.util.Set<Type> |
NewCollectionOrMapWrapper.getImportTypes() |
| Modifier and Type | Method and Description |
|---|---|
static Assignment |
AssignmentFactory.createMethodReference(SourceMethod method,
MapperReference declaringMapper,
Type targetType) |
| Modifier and Type | Method and Description |
|---|---|
static Assignment |
AssignmentFactory.createTypeConversion(java.util.Set<Type> importTypes,
java.util.List<Type> exceptionTypes,
java.lang.String expression) |
static Assignment |
AssignmentFactory.createTypeConversion(java.util.Set<Type> importTypes,
java.util.List<Type> exceptionTypes,
java.lang.String expression) |
| Constructor and Description |
|---|
AdderWrapper(Assignment decoratedAssignment,
java.util.List<Type> exceptionTypesToExclude,
java.lang.String sourceReference,
Type sourceType) |
MethodReference(SourceMethod method,
MapperReference declaringMapper,
Type targetType)
Creates a new reference to the given method.
|
| Constructor and Description |
|---|
AdderWrapper(Assignment decoratedAssignment,
java.util.List<Type> exceptionTypesToExclude,
java.lang.String sourceReference,
Type sourceType) |
LocalVarWrapper(Assignment decoratedAssignment,
java.util.List<Type> exceptionTypesToExclude) |
NewCollectionOrMapWrapper(Assignment decoratedAssignment,
java.util.Set<Type> implementationTypes) |
SetterWrapper(Assignment decoratedAssignment,
java.util.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(javax.lang.model.element.ExecutableElement method) |
Type |
DefaultConversionContext.getTargetType() |
Type |
ConversionContext.getTargetType()
Returns the target type of this conversion.
|
Type |
Parameter.getType() |
Type |
TypeFactory.getType(java.lang.Class<?> type) |
Type |
TypeFactory.getType(java.lang.String canonicalName) |
Type |
TypeFactory.getType(javax.lang.model.element.TypeElement typeElement) |
Type |
TypeFactory.getType(javax.lang.model.type.TypeMirror mirror) |
| Modifier and Type | Method and Description |
|---|---|
java.util.Set<Type> |
Parameter.getImportTypes() |
abstract java.util.Set<Type> |
ModelElement.getImportTypes()
Returns a set containing those
Types referenced by this model element for which an import statement needs
to be declared. |
java.util.Set<Type> |
Type.getImportTypes() |
java.util.List<Type> |
TypeFactory.getThrownTypes(javax.lang.model.element.ExecutableElement method) |
java.util.List<Type> |
Type.getTypeParameters() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
Type.canAccess(Type type,
javax.lang.model.element.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.
|
javax.lang.model.element.ExecutableElement |
Type.getAdderForType(Type collectionProperty,
java.lang.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,
java.lang.String format) |
Parameter(java.lang.String name,
Type type) |
Parameter(java.lang.String name,
Type type,
boolean mappingTarget,
boolean targetType) |
Type(javax.lang.model.util.Types typeUtils,
javax.lang.model.util.Elements elementUtils,
javax.lang.model.type.TypeMirror typeMirror,
javax.lang.model.element.TypeElement typeElement,
java.util.List<Type> typeParameters,
Type implementationType,
java.lang.String packageName,
java.lang.String name,
java.lang.String qualifiedName,
boolean isInterface,
boolean isEnumType,
boolean isIterableType,
boolean isCollectionType,
boolean isMapType,
boolean isImported) |
| Constructor and Description |
|---|
Type(javax.lang.model.util.Types typeUtils,
javax.lang.model.util.Elements elementUtils,
javax.lang.model.type.TypeMirror typeMirror,
javax.lang.model.element.TypeElement typeElement,
java.util.List<Type> typeParameters,
Type implementationType,
java.lang.String packageName,
java.lang.String name,
java.lang.String qualifiedName,
boolean isInterface,
boolean isEnumType,
boolean isIterableType,
boolean isCollectionType,
boolean isMapType,
boolean isImported) |
| Modifier and Type | Method and Description |
|---|---|
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 |
SourceMethod.getResultType() |
Type |
SourceMethod.getReturnType()
Returns the return type of the method
|
Type |
Method.getReturnType()
Returns the return type of the method
|
| Modifier and Type | Method and Description |
|---|---|
java.util.List<Type> |
SourceMethod.getThrownTypes() |
java.util.List<Type> |
Method.getThrownTypes()
Returns all exceptions thrown by this method
|
| Modifier and Type | Method and Description |
|---|---|
static SourceMethod |
SourceMethod.forFactoryMethod(Type declaringMapper,
javax.lang.model.element.ExecutableElement executable,
Type returnType,
java.util.List<Type> exceptionTypes,
javax.lang.model.util.Types typeUtils) |
static SourceMethod |
SourceMethod.forMethodRequiringImplementation(javax.lang.model.element.ExecutableElement executable,
java.util.List<Parameter> parameters,
Type returnType,
java.util.List<Type> exceptionTypes,
java.util.Map<java.lang.String,java.util.List<Mapping>> mappings,
IterableMapping iterableMapping,
MapMapping mapMapping,
javax.lang.model.util.Types typeUtils) |
static SourceMethod |
SourceMethod.forReferencedMethod(Type declaringMapper,
javax.lang.model.element.ExecutableElement executable,
java.util.List<Parameter> parameters,
Type returnType,
java.util.List<Type> exceptionTypes,
javax.lang.model.util.Types typeUtils) |
boolean |
SourceMethod.matches(java.util.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(java.util.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 SourceMethod |
SourceMethod.forFactoryMethod(Type declaringMapper,
javax.lang.model.element.ExecutableElement executable,
Type returnType,
java.util.List<Type> exceptionTypes,
javax.lang.model.util.Types typeUtils) |
static SourceMethod |
SourceMethod.forMethodRequiringImplementation(javax.lang.model.element.ExecutableElement executable,
java.util.List<Parameter> parameters,
Type returnType,
java.util.List<Type> exceptionTypes,
java.util.Map<java.lang.String,java.util.List<Mapping>> mappings,
IterableMapping iterableMapping,
MapMapping mapMapping,
javax.lang.model.util.Types typeUtils) |
static SourceMethod |
SourceMethod.forReferencedMethod(Type declaringMapper,
javax.lang.model.element.ExecutableElement executable,
java.util.List<Parameter> parameters,
Type returnType,
java.util.List<Type> exceptionTypes,
javax.lang.model.util.Types typeUtils) |
boolean |
SourceMethod.matches(java.util.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(java.util.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 |
|---|---|
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 |
XmlGregorianCalendarToCalendar.getReturnType() |
Type |
CalendarToXmlGregorianCalendar.getReturnType() |
Type |
XmlGregorianCalendarToDate.getReturnType() |
Type |
XmlGregorianCalendarToString.getReturnType() |
Type |
JaxbElemToValue.getReturnType() |
Type |
ListOfJaxbElemToListOfValue.getReturnType() |
Type |
DateToXmlGregorianCalendar.getReturnType() |
Type |
StringToXmlGregorianCalendar.getReturnType() |
| Modifier and Type | Method and Description |
|---|---|
java.util.Set<Type> |
XmlGregorianCalendarToCalendar.getImportTypes() |
java.util.Set<Type> |
BuiltInMethod.getImportTypes()
Returns the types used by this method for which import statements need to be generated.
|
java.util.Set<Type> |
CalendarToXmlGregorianCalendar.getImportTypes() |
java.util.Set<Type> |
XmlGregorianCalendarToDate.getImportTypes() |
java.util.Set<Type> |
XmlGregorianCalendarToString.getImportTypes() |
java.util.Set<Type> |
JaxbElemToValue.getImportTypes() |
java.util.Set<Type> |
ListOfJaxbElemToListOfValue.getImportTypes() |
java.util.Set<Type> |
DateToXmlGregorianCalendar.getImportTypes() |
java.util.Set<Type> |
StringToXmlGregorianCalendar.getImportTypes() |
java.util.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(java.util.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(java.util.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 java.util.List<Type> |
MethodSelectors.getParameterTypes(TypeFactory typeFactory,
java.util.List<Parameter> parameters,
Type sourceType,
Type returnType) |
| Modifier and Type | Method and Description |
|---|---|
<T extends Method> |
MethodSelector.getMatchingMethods(SourceMethod mappingMethod,
java.util.List<T> methods,
Type parameterType,
Type returnType,
java.lang.String targetPropertyName)
Selects those methods which match the given types and other criteria
|
<T extends Method> |
MethodSelectors.getMatchingMethods(SourceMethod mappingMethod,
java.util.List<T> methods,
Type parameterType,
Type returnType,
java.lang.String targetPropertyName) |
<T extends Method> |
InheritanceSelector.getMatchingMethods(SourceMethod mappingMethod,
java.util.List<T> methods,
Type parameterType,
Type returnType,
java.lang.String targetPropertyName) |
<T extends Method> |
XmlElementDeclSelector.getMatchingMethods(SourceMethod mappingMethod,
java.util.List<T> methods,
Type parameterType,
Type returnType,
java.lang.String targetPropertyName) |
<T extends Method> |
TypeSelector.getMatchingMethods(SourceMethod mappingMethod,
java.util.List<T> methods,
Type parameterType,
Type returnType,
java.lang.String targetPropertyName) |
static java.util.List<Type> |
MethodSelectors.getParameterTypes(TypeFactory typeFactory,
java.util.List<Parameter> parameters,
Type sourceType,
Type returnType) |
| Modifier and Type | Method and Description |
|---|---|
Assignment |
MappingResolver.getTargetAssignment(SourceMethod mappingMethod,
java.lang.String mappedElement,
java.util.List<MapperReference> mapperReferences,
java.util.List<SourceMethod> methods,
Type sourceType,
Type targetType,
java.lang.String targetPropertyName,
java.lang.String dateFormat,
java.lang.String sourceReference)
returns a parameter assignment
|
Copyright © 2012-2014. All Rights Reserved.