1136 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
347a436cda #1382 Change module for java.annotation.Generated in the documentation
closes #1382
2018-07-15 10:56:06 +02:00
Sjaak Derksen
58a2aa94bb
#1482 allowing generic self references in types when matching 2018-07-14 16:27:10 +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
Filip Hrisafov
62ffa3fa43
Add Gervais to the copyright.txt 2018-07-12 22:14:56 +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
tomoya-yokota
81f82a54a5 Document of sample code is broken. 2018-07-11 20:29:08 +02:00
tomoya-yokota
e2c8559a62 Update document on gradle-apt-plugin 2018-07-11 20:21:53 +02:00
sngrekov
b03ca8b7a9 Add sample of @Mapping annotation to @InheritInverseConfiguration 2018-07-02 10:54:57 +02:00
tomoya-yokota
fc5f937a71 Fix Method name typo 2018-07-01 23:24:01 +02:00
Christian Bandowski
508de6733e #1523 dont lose timezone mapping Calendar to XMLGregorianCalendar 2018-06-21 22:32:36 +02:00
cvanburen
f4ed077aeb Documentation update, section 3, fixing typos 2018-06-05 23:05:21 +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
Christian Bandowski
db851701ef #1454 add more tests for builder lifecycle methods 2018-05-17 21:39:38 +02:00
Christian Bandowski
eeddc17de4 #537 add unit test 2018-05-09 22:28:16 +02:00
sjaakd
6fbc4cf253 #1180 non existing (nested) property in shared config 2018-05-08 23:18:18 +02:00
Filip Hrisafov
771debee88
#1453 Make sure that we always forge iterable / map mapping methods without bounds
When generating collection / map mapping methods make sure that the method result type is without bounds
2018-05-06 22:03:16 +02:00
sjaakd
45cc87849b #1458 reporting error detail from literal assignment 2018-05-05 22:56:00 +02:00
Christian Bandowski
9e299a2ba1 Use constants instead of strings in ValueMapping javadoc 2018-05-05 22:19:27 +02:00
Christian Bandowski
b291907918 #1460 Ensures the FQN will be used for SimpleConversion if required
* Added getReferenceName() to Type which returns simple or fully-qualified-name
* Use getReferenceName() in all SimpleConversions
* Added testcase that is not working without these changes
* Added ConversionUtils with a lot of helper methods to create the "reference names" used in SimpleConversions
2018-05-05 20:42:37 +02:00
Filip Hrisafov
bf31ec72de
#1338 Using an adder with non generic source collection should work 2018-05-04 08:09:37 +02:00
Filip Hrisafov
7a3f6d973e
#1473 Make sure that the SPIs are lazy initialized in the AnnotationProcessorContext 2018-05-03 23:15:23 +02:00
Filip Hrisafov
b6905d5168 Make sure we have a conflicting test with adder 2018-05-03 21:51:37 +02:00
Filip Hrisafov
84bf019fdf More detailed check for adder in builde 2018-05-03 21:51:37 +02:00
Filip Hrisafov
adde6826a6 #1449 Adders should not be considered as builder setter methods 2018-05-03 21:51:37 +02:00
Filip Hrisafov
7306c52529 #1415 Use Immutables AccesorNamingStrategy and BuilderProvider when immutables are present
This allows out of the box support for Immutables by picking the right default strategy when immutables are present
2018-05-01 18:26:34 +02:00
Filip Hrisafov
8a24706026 Extract methods that use the AccessorNamingStrategy into class instance methods
This helps towards #1415, where we need to use strategy based on presence / absence of Immutables
2018-05-01 18:26:34 +02:00
Filip Hrisafov
720854913a Disable running the annotation processing in the module defining it 2018-05-01 18:26:34 +02:00
sjaakd
d92b439a60 #1462 define constants as JLS literal types, enforce long L suffix 2018-04-29 09:12:49 +02:00
sjaakd
ffb720dc29 #1459 javadoc on constant assigment 2018-04-29 09:12:49 +02:00
Filip Hrisafov
5c799b73ef
#1452 support BeanMapping#ignoreByDefault for builders 2018-04-28 10:17:52 +02:00
Filip Hrisafov
cf19a6b637
#1423 Updating types that have a builder should be allowed
It is possible that a type has both a builder and accessors.
In such case doing an update to this type should be allowed
2018-04-28 09:09:44 +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
35f5400e00 #1401 improvements by direct assigning constants 2018-04-25 20:25:11 +02:00
Filip Hrisafov
2fe7f6be2b
#1387 Improve error message when unknown source parameter is used in Mapping 2018-04-24 21:39:28 +02:00
Filip Hrisafov
4a05c8d5f1
#1433 Support for lifecycle methods for builders
When doing mappings with builder the effective type should be considered for lifecycle callback methods
2018-04-24 21:36:48 +02:00
Filip Hrisafov
47ffb04106 #1436 Add since tag to new API elements 2018-04-22 16:33:14 +02:00
Filip Hrisafov
2f44bab9c9
Add Christian to copyright.txt 2018-04-21 19:07:59 +02:00
Christian Bandowski
5540efc482 #1425 Added findType to VirtualMappingMethod and use it in all builtin templates
Together with the includeModel directive this will ensure that the type will be written to the file as a FQN if required, otherwise as a simple name.
2018-04-21 18:59:29 +02:00
sjaakd
4f5db83de7 #1392 add option to default ignoreAll mappings in a bean mapping method 2018-04-21 09:07:13 +02:00
Christian Bandowski
72bf87f409 Remove cloudbees CI links and add travis-ci to readme 2018-04-19 19:39:43 +02:00
Lauri Apple
f63903a822 Update readme.md 2018-04-17 20:29:40 +02:00
Lauri Apple
721e3efec2 Update readme.md 2018-04-17 20:29:40 +02:00
Lauri Apple
60f27dbafc Update readme.md 2018-04-17 20:29:40 +02:00
Filip Hrisafov
43a9419c33
#1417 Add documentation about the builder support 2018-04-15 10:31:45 +02:00
Filip Hrisafov
5834368b15
#1431 Factory method resolution should be done on the effective type
This allows using factories for builder types as well
2018-04-15 10:19:58 +02:00
Filip Hrisafov
050e893c51
Add David to copyright.txt 2018-04-15 09:35:33 +02:00
dvfeinblum
075d2c4113 #1383 Invalid @Mapping values should be reported on the @Mapping annotation 2018-04-15 08:33:00 +02:00