#65 Formatting

This commit is contained in:
Gunnar Morling 2014-11-05 22:43:09 +01:00
parent 160af62acf
commit 1d35f2f70c
11 changed files with 75 additions and 84 deletions

View File

@ -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

View File

@ -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);
} }

View File

@ -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);
} }

View File

@ -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 })

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -22,7 +22,6 @@ import java.util.List;
/** /**
*
* @author Sjaak Derksen * @author Sjaak Derksen
*/ */
public class Song { public class Song {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {