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;
|
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.Mapper;
|
||||||
import org.mapstruct.Mapping;
|
import org.mapstruct.Mapping;
|
||||||
import org.mapstruct.Mappings;
|
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;
|
import org.mapstruct.factory.Mappers;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author Sjaak Derksen
|
* @author Sjaak Derksen
|
||||||
*/
|
*/
|
||||||
@Mapper
|
@Mapper
|
||||||
|
@ -19,15 +19,14 @@
|
|||||||
package org.mapstruct.ap.test.nestedsourceproperties;
|
package org.mapstruct.ap.test.nestedsourceproperties;
|
||||||
|
|
||||||
import org.mapstruct.CollectionMappingStrategy;
|
import org.mapstruct.CollectionMappingStrategy;
|
||||||
import org.mapstruct.ap.test.nestedsourceproperties.source.Chart;
|
|
||||||
import org.mapstruct.Mapper;
|
import org.mapstruct.Mapper;
|
||||||
import org.mapstruct.Mapping;
|
import org.mapstruct.Mapping;
|
||||||
import org.mapstruct.Mappings;
|
import org.mapstruct.Mappings;
|
||||||
|
import org.mapstruct.ap.test.nestedsourceproperties.source.Chart;
|
||||||
import org.mapstruct.ap.test.nestedsourceproperties.target.ChartPositions;
|
import org.mapstruct.ap.test.nestedsourceproperties.target.ChartPositions;
|
||||||
import org.mapstruct.factory.Mappers;
|
import org.mapstruct.factory.Mappers;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author Sjaak Derksen
|
* @author Sjaak Derksen
|
||||||
*/
|
*/
|
||||||
@Mapper(collectionMappingStrategy = CollectionMappingStrategy.ADDER_PREFERRED)
|
@Mapper(collectionMappingStrategy = CollectionMappingStrategy.ADDER_PREFERRED)
|
||||||
@ -36,6 +35,7 @@ public interface ArtistToChartEntryAdder {
|
|||||||
ArtistToChartEntryAdder MAPPER = Mappers.getMapper( ArtistToChartEntryAdder.class );
|
ArtistToChartEntryAdder MAPPER = Mappers.getMapper( ArtistToChartEntryAdder.class );
|
||||||
|
|
||||||
@Mappings({
|
@Mappings({
|
||||||
@Mapping( target = "positions", source = "chart.song.positions" ), } )
|
@Mapping(target = "positions", source = "chart.song.positions"),
|
||||||
|
})
|
||||||
ChartPositions map(Chart chart);
|
ChartPositions map(Chart chart);
|
||||||
}
|
}
|
||||||
|
@ -18,15 +18,14 @@
|
|||||||
*/
|
*/
|
||||||
package org.mapstruct.ap.test.nestedsourceproperties;
|
package org.mapstruct.ap.test.nestedsourceproperties;
|
||||||
|
|
||||||
import org.mapstruct.ap.test.nestedsourceproperties.source.Chart;
|
|
||||||
import org.mapstruct.Mapper;
|
import org.mapstruct.Mapper;
|
||||||
import org.mapstruct.Mapping;
|
import org.mapstruct.Mapping;
|
||||||
import org.mapstruct.Mappings;
|
import org.mapstruct.Mappings;
|
||||||
|
import org.mapstruct.ap.test.nestedsourceproperties.source.Chart;
|
||||||
import org.mapstruct.ap.test.nestedsourceproperties.target.ChartPositions;
|
import org.mapstruct.ap.test.nestedsourceproperties.target.ChartPositions;
|
||||||
import org.mapstruct.factory.Mappers;
|
import org.mapstruct.factory.Mappers;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author Sjaak Derksen
|
* @author Sjaak Derksen
|
||||||
*/
|
*/
|
||||||
@Mapper
|
@Mapper
|
||||||
@ -35,6 +34,7 @@ public interface ArtistToChartEntryGetter {
|
|||||||
ArtistToChartEntryGetter MAPPER = Mappers.getMapper( ArtistToChartEntryGetter.class );
|
ArtistToChartEntryGetter MAPPER = Mappers.getMapper( ArtistToChartEntryGetter.class );
|
||||||
|
|
||||||
@Mappings({
|
@Mappings({
|
||||||
@Mapping( target = "positions", source = "chart.song.positions" ), } )
|
@Mapping(target = "positions", source = "chart.song.positions"),
|
||||||
|
})
|
||||||
ChartPositions map(Chart chart);
|
ChartPositions map(Chart chart);
|
||||||
}
|
}
|
||||||
|
@ -18,10 +18,6 @@
|
|||||||
*/
|
*/
|
||||||
package org.mapstruct.ap.test.nestedsourceproperties;
|
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 java.util.Arrays;
|
||||||
|
|
||||||
import org.junit.Test;
|
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.WithClasses;
|
||||||
import org.mapstruct.ap.testutil.runner.AnnotationProcessorTestRunner;
|
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
|
* @author Sjaak Derksen
|
||||||
*/
|
*/
|
||||||
@WithClasses({ Song.class, Artist.class, Chart.class, Label.class, Studio.class, ChartEntry.class })
|
@WithClasses({ Song.class, Artist.class, Chart.class, Label.class, Studio.class, ChartEntry.class })
|
||||||
|
@ -19,7 +19,6 @@
|
|||||||
package org.mapstruct.ap.test.nestedsourceproperties.source;
|
package org.mapstruct.ap.test.nestedsourceproperties.source;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author Sjaak Derksen
|
* @author Sjaak Derksen
|
||||||
*/
|
*/
|
||||||
public class Artist {
|
public class Artist {
|
||||||
|
@ -19,7 +19,6 @@
|
|||||||
package org.mapstruct.ap.test.nestedsourceproperties.source;
|
package org.mapstruct.ap.test.nestedsourceproperties.source;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author Sjaak Derksen
|
* @author Sjaak Derksen
|
||||||
*/
|
*/
|
||||||
public class Chart {
|
public class Chart {
|
||||||
|
@ -19,7 +19,6 @@
|
|||||||
package org.mapstruct.ap.test.nestedsourceproperties.source;
|
package org.mapstruct.ap.test.nestedsourceproperties.source;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author Sjaak Derksen
|
* @author Sjaak Derksen
|
||||||
*/
|
*/
|
||||||
public class Label {
|
public class Label {
|
||||||
|
@ -22,7 +22,6 @@ import java.util.List;
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author Sjaak Derksen
|
* @author Sjaak Derksen
|
||||||
*/
|
*/
|
||||||
public class Song {
|
public class Song {
|
||||||
|
@ -19,7 +19,6 @@
|
|||||||
package org.mapstruct.ap.test.nestedsourceproperties.source;
|
package org.mapstruct.ap.test.nestedsourceproperties.source;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author Sjaak Derksen
|
* @author Sjaak Derksen
|
||||||
*/
|
*/
|
||||||
public class Studio {
|
public class Studio {
|
||||||
|
@ -19,7 +19,6 @@
|
|||||||
package org.mapstruct.ap.test.nestedsourceproperties.target;
|
package org.mapstruct.ap.test.nestedsourceproperties.target;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author Sjaak Derksen
|
* @author Sjaak Derksen
|
||||||
*/
|
*/
|
||||||
public class ChartEntry {
|
public class ChartEntry {
|
||||||
|
@ -19,7 +19,6 @@ import java.util.ArrayList;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author Sjaak Derksen
|
* @author Sjaak Derksen
|
||||||
*/
|
*/
|
||||||
public class ChartPositions {
|
public class ChartPositions {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user