88 Commits

Author SHA1 Message Date
MapStruct Team
b35126e609 #1411 Update copyright header on all files
* Use new shorter copyright header without a year
* Use SLASHSTAR_STYLE for Java files
2018-07-15 19:29:28 +02:00
Filip Hrisafov
616aaa986d #1479 Fix typos in the Javadoc 2018-07-12 23:30:37 +02:00
Filip Hrisafov
ef270caecb
#1479 Add support for Builders with multiple build methods (#1498)
* Add new @Builder annotation for defining a build method
* When there are multiple build methods look for a method named `build` and if found use it
* If @Builder is defined than look for a build method with the defined method
* When a type has multiple builder creation methods throw an exception and don't use the builder

Defaulting to a method named `build` will make sure that a correct method is selected for:
* FreeBuilder - it has two methods: `build` and `buildPartial`
* Protobuf - it has three methods: `getDefaultInstanceForType`, `build` and `buildPartial`
2018-07-12 23:16:53 +02:00
Gervais Blaise
c9bc1df132 Allow package-private mapper
Use and make the default constructor accessible to create the mapper
instance. 

fixes #1365
2018-07-12 22:12:09 +02:00
sjaakd
3a4fcb5bcb #1398 allowing @ObjectFactory methods on context, fixing javadoc 2018-05-24 22:51:51 +02:00
sjaakd
e67c849c17 #1398 allowing @ObjectFactory methods on context 2018-05-24 20:28:14 +02:00
Filip Hrisafov
7e7fcfbb94
#1317 Add support for ignoring unmapped source properties
This property has only effect on the unmapped source properties report
2018-04-25 20:45:02 +02:00
sjaakd
4f5db83de7 #1392 add option to default ignoreAll mappings in a bean mapping method 2018-04-21 09:07:13 +02:00
Jeff Smyth
48b9bd72be #1363 Add support for using default expression 2018-02-19 23:01:51 +01:00
Filip Hrisafov
e4839fce5d #1333 Add since tags for unmappedSourcePolicy() 2017-11-18 09:34:25 +01:00
spoerri
92fe1093e4 #610 Add support for unmappedSourcePolicy 2017-10-22 21:06:17 +02:00
Kevin
0192bdaf83 #571 Add Constructor Injection for Annotation Based Component Model
- Allow configuring of injection strategy (Constructor / Field)
- Default injection strategy is Field
2017-10-20 22:56:48 +02:00
sjaakd
4d8bc29347 #1255 Extension of autoInheritanceStrategy, removing of name based ignore reverse mapping 2017-08-23 22:54:10 +02:00
Filip Hrisafov
2f4cf7c905 #748 Add note that the passed parameter to MappingTarget must not be null 2017-08-16 22:19:49 +02:00
Filip Hrisafov
3004ea28c5 #1131 Use SourceRHS source type for update methods factories
If a SourceRHS is present then the source type of the SourceRHS and the MappingContext parameters are considered for the factory method selection, i.e. the other source parameters are ignored
2017-07-11 21:53:38 +02:00
Tillerino
00385a1cdb #611 Allow nested declaration of Mappers
* #611 Allow nested declaration of Mappers

Up until now, if a Mapper was declared as a nested interface, say
EnclosingClass.NestedMapper, the implementation of the mapper was
generated as NestedMapperImpl in the same package. The Mappers factory
class then tried to load EnclosingClass$NestedMapperImpl, which would
fail.
2017-07-07 19:03:56 +02:00
Filip Hrisafov
2e09944b19 #1213 General code cleanups:
* #122 Use util methods when possible
* Fix some warnings in Javadoc generation
* Don't use raw classes when not needed
* Add .yml, binding.xjb and .asciidoc files to license check exclusion
2017-05-24 14:15:46 +02:00
Filip Hrisafov
267c2e98f9 #993 Add support for disabling the generation of forged mapping methods 2017-04-20 23:37:16 +02:00
sjaakd
e154452d53 #1126 Add new CollectionMappingStrategy TARGET_IMMUTABLE 2017-03-14 21:36:36 +01:00
Andreas Gudian
32bf03642c #983, #975 rephrase documentation of AfterMapping/BeforeMapping and document @Context usage 2017-02-02 21:57:26 +01:00
Andreas Gudian
ac03999170 #975 Allow calling BeforeMapping/AfterMapping methods directly on @Context params 2017-02-02 21:57:26 +01:00
Gunnar Morling
754877cece #510 Adding experimental SPI for letting AST-modifying annotation processors such as Lombok tell us about future modifications 2017-01-31 18:22:52 +01:00
Filip Hrisafov
6b07dda829 #962 Add support for mapping Java 8 Streams 2017-01-06 09:49:16 +01:00
Andreas Gudian
48d7963cca Merge branch '1.1-master' 2017-01-05 22:04:29 +01:00
Andreas Gudian
b02f8e5df5 #1032 Update license headers to 2017 2017-01-05 18:55:26 +01:00
Andreas Gudian
44fe197d3b #975 Introduce @Context annotation for passing context parameters through generated mapping methods to custom methods 2016-12-25 11:05:58 +01:00
Andreas Gudian
050c398da6 #966 Avoid missing newlines between methods and multiple newlines (generally) by adding a checkstyle rule, fixing current incarnations. 2016-12-01 21:52:58 +01:00
Remo
35b8972d76 #824 Target Bean Factory
Introduced @ObjectFactory annotation to distinguish between factory and
mapping methods. Until now this was decided based on the lack of
parameters. @ObjectFactory gives a factory access to source object by
defining them as parameters.
2016-12-01 10:38:37 +01:00
sjaakd
824fb993b5 #707 Document to always use RetentionPolicy.CLASS in custom qualifier annotations. 2016-08-30 21:52:46 +02:00
Filip Hrisafov
cf88cf9e92 #860 switch to using assertj instead of FEST assertions 2016-08-27 13:10:42 +02:00
sjaakd
23ebd273c8 #669 Documentation update for source presence checker and nullValueCheckStrategy 2016-07-06 23:11:04 +02:00
sjaakd
b1f03689d9 #669 rework into sourcepresencecheck SPI and nullvaluecheckstrategy 2016-07-05 22:50:10 +02:00
seanjob
1af4441d2d #669 ispresentcheck and NULL check implementation 2016-07-05 22:50:10 +02:00
Gunnar Morling
c47fd95d04 #801 Trying to load mapper implementation types via the mapper interface's loader first 2016-07-05 22:24:02 +02:00
sjaakd
3700052cc6 #679 Adding testcases, helpermethods for decimalconversion, doc update 2016-06-15 23:34:48 +02:00
cliedeman
607d0fd6f0 Implemented Feature from Issue #679: Support of numberFormat for Number to String mapping 2016-06-07 22:16:04 +02:00
sjaakd
d59873d923 Fixing some general javadoc issues. 2016-03-15 22:20:10 +01:00
sjaakd
e15b873b9a #784 Javadoc issue 2016-03-15 22:20:10 +01:00
sjaakd
d8402a7df2 #784 Named should follow Qualifier strategy. 2016-03-15 22:20:10 +01:00
sjaakd
ae4d0f77e1 #749 Introduction of @ValueMapping, @ValueMappings 2016-03-15 21:19:55 +01:00
Andreas Gudian
c671692cd0 #770 Update retention-policy of custom qualifier annotations in docs and tests to CLASS. 2016-03-07 19:15:50 +01:00
sjaakd
18912727ca #761 fixing cloudbees issue. 2016-02-20 22:31:07 +01:00
sjaakd
15b6afef58 #761 using fully qualified names in javadoc for conflicting annotations 2016-02-20 22:21:16 +01:00
Gunnar Morling
5e88dae8ce #750 Further expanding comment 2016-02-20 11:42:47 +01:00
sjaakd
e039c74c2a #750 Documentation update for @Named 2016-02-19 22:48:20 +01:00
sjaakd
bb1ccac434 #750 Introducing the @Named annotation 2016-02-16 21:10:30 +01:00
Sam Wright
5ede0e91db #664 Annotate mapper implementations with @Singleton when using jsr330. 2016-02-02 19:52:24 +01:00
Gunnar Morling
34aceff5f8 #723 Updating year in license headers 2016-01-16 18:00:09 +01:00
Andreas Gudian
72a7bdbb83 #592 Improve @DecoratedWith javadoc 2015-08-23 21:46:06 +02:00
Andreas Gudian
590363cf2f #592 Fix Decorator-support for component model 'spring' and 'jsr330', extend decorator integration-tests, add examples to @DecoratedWith javadoc 2015-08-23 16:40:54 +02:00