mirror of
https://github.com/mapstruct/mapstruct.git
synced 2025-07-12 00:00:08 +08:00
#65 Formatting
This commit is contained in:
parent
160af62acf
commit
1d35f2f70c
@ -18,16 +18,15 @@
|
||||
*/
|
||||
package org.mapstruct.ap.test.nestedsourceproperties;
|
||||
|
||||
import org.mapstruct.ap.test.nestedsourceproperties.source.Song;
|
||||
import org.mapstruct.ap.test.nestedsourceproperties.source.Chart;
|
||||
import org.mapstruct.ap.test.nestedsourceproperties.target.ChartEntry;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.Mapping;
|
||||
import org.mapstruct.Mappings;
|
||||
import org.mapstruct.ap.test.nestedsourceproperties.source.Chart;
|
||||
import org.mapstruct.ap.test.nestedsourceproperties.source.Song;
|
||||
import org.mapstruct.ap.test.nestedsourceproperties.target.ChartEntry;
|
||||
import org.mapstruct.factory.Mappers;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Sjaak Derksen
|
||||
*/
|
||||
@Mapper
|
||||
|
@ -19,15 +19,14 @@
|
||||
package org.mapstruct.ap.test.nestedsourceproperties;
|
||||
|
||||
import org.mapstruct.CollectionMappingStrategy;
|
||||
import org.mapstruct.ap.test.nestedsourceproperties.source.Chart;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.Mapping;
|
||||
import org.mapstruct.Mappings;
|
||||
import org.mapstruct.ap.test.nestedsourceproperties.source.Chart;
|
||||
import org.mapstruct.ap.test.nestedsourceproperties.target.ChartPositions;
|
||||
import org.mapstruct.factory.Mappers;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Sjaak Derksen
|
||||
*/
|
||||
@Mapper(collectionMappingStrategy = CollectionMappingStrategy.ADDER_PREFERRED)
|
||||
@ -36,6 +35,7 @@ public interface ArtistToChartEntryAdder {
|
||||
ArtistToChartEntryAdder MAPPER = Mappers.getMapper( ArtistToChartEntryAdder.class );
|
||||
|
||||
@Mappings({
|
||||
@Mapping( target = "positions", source = "chart.song.positions" ), } )
|
||||
@Mapping(target = "positions", source = "chart.song.positions"),
|
||||
})
|
||||
ChartPositions map(Chart chart);
|
||||
}
|
||||
|
@ -18,15 +18,14 @@
|
||||
*/
|
||||
package org.mapstruct.ap.test.nestedsourceproperties;
|
||||
|
||||
import org.mapstruct.ap.test.nestedsourceproperties.source.Chart;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.Mapping;
|
||||
import org.mapstruct.Mappings;
|
||||
import org.mapstruct.ap.test.nestedsourceproperties.source.Chart;
|
||||
import org.mapstruct.ap.test.nestedsourceproperties.target.ChartPositions;
|
||||
import org.mapstruct.factory.Mappers;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Sjaak Derksen
|
||||
*/
|
||||
@Mapper
|
||||
@ -35,6 +34,7 @@ public interface ArtistToChartEntryGetter {
|
||||
ArtistToChartEntryGetter MAPPER = Mappers.getMapper( ArtistToChartEntryGetter.class );
|
||||
|
||||
@Mappings({
|
||||
@Mapping( target = "positions", source = "chart.song.positions" ), } )
|
||||
@Mapping(target = "positions", source = "chart.song.positions"),
|
||||
})
|
||||
ChartPositions map(Chart chart);
|
||||
}
|
||||
|
@ -18,10 +18,6 @@
|
||||
*/
|
||||
package org.mapstruct.ap.test.nestedsourceproperties;
|
||||
|
||||
import static org.fest.assertions.Assertions.assertThat;
|
||||
import static org.junit.Assert.assertFalse;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
import org.junit.Test;
|
||||
@ -38,8 +34,11 @@ import org.mapstruct.ap.testutil.IssueKey;
|
||||
import org.mapstruct.ap.testutil.WithClasses;
|
||||
import org.mapstruct.ap.testutil.runner.AnnotationProcessorTestRunner;
|
||||
|
||||
import static org.fest.assertions.Assertions.assertThat;
|
||||
import static org.junit.Assert.assertFalse;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Sjaak Derksen
|
||||
*/
|
||||
@WithClasses({ Song.class, Artist.class, Chart.class, Label.class, Studio.class, ChartEntry.class })
|
||||
|
@ -19,7 +19,6 @@
|
||||
package org.mapstruct.ap.test.nestedsourceproperties.source;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Sjaak Derksen
|
||||
*/
|
||||
public class Artist {
|
||||
|
@ -19,7 +19,6 @@
|
||||
package org.mapstruct.ap.test.nestedsourceproperties.source;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Sjaak Derksen
|
||||
*/
|
||||
public class Chart {
|
||||
|
@ -19,7 +19,6 @@
|
||||
package org.mapstruct.ap.test.nestedsourceproperties.source;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Sjaak Derksen
|
||||
*/
|
||||
public class Label {
|
||||
|
@ -22,7 +22,6 @@ import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Sjaak Derksen
|
||||
*/
|
||||
public class Song {
|
||||
|
@ -19,7 +19,6 @@
|
||||
package org.mapstruct.ap.test.nestedsourceproperties.source;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Sjaak Derksen
|
||||
*/
|
||||
public class Studio {
|
||||
|
@ -19,7 +19,6 @@
|
||||
package org.mapstruct.ap.test.nestedsourceproperties.target;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Sjaak Derksen
|
||||
*/
|
||||
public class ChartEntry {
|
||||
|
@ -19,7 +19,6 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Sjaak Derksen
|
||||
*/
|
||||
public class ChartPositions {
|
||||
|
Loading…
x
Reference in New Issue
Block a user