Fixing Javadoc issues

This commit is contained in:
Gunnar Morling 2014-11-27 19:32:58 +01:00
parent 63ca67786d
commit 4d236472e2
9 changed files with 39 additions and 50 deletions

View File

@ -33,6 +33,10 @@
<packaging>jar</packaging> <packaging>jar</packaging>
<name>MapStruct Core Common</name> <name>MapStruct Core Common</name>
<properties>
<maven.javadoc.skip>true</maven.javadoc.skip>
</properties>
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>junit</groupId> <groupId>junit</groupId>

View File

@ -44,7 +44,7 @@ public @interface Mapper {
/** /**
* Additional types for which an import statement is to be added to the generated mapper implementation class. * Additional types for which an import statement is to be added to the generated mapper implementation class.
* This allows to refer to those types from within mapping expressions given via {@link #expression()} using * This allows to refer to those types from within mapping expressions given via {@link Mapping#expression()} using
* their simple name rather than their fully-qualified name. * their simple name rather than their fully-qualified name.
* *
* @return classes to add in the imports of the generated implementation. * @return classes to add in the imports of the generated implementation.

View File

@ -24,29 +24,27 @@ import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target; import java.lang.annotation.Target;
/** /**
* Declares a target annotation to be a qualifier. * Declares an annotation type to be a qualifier. Qualifier annotations allow unambiguously identify a suitable mapping
* * method in case several methods qualify to map a bean property, iterable element etc.
* <p> * <p>
* For more info see: * For more info see:
* <ol> * <ul>
* <li>{@link Mapping#qualifiedBy() }</li> * <li>{@link Mapping#qualifiedBy() }</li>
* <li>{@link IterableMapping#qualifiedBy() }</li> * <li>{@link IterableMapping#qualifiedBy() }</li>
* <li>{@link MapMapping#keyQualifiedBy() }</li> * <li>{@link MapMapping#keyQualifiedBy() }</li>
* <li>{@link MapMapping#valueQualifiedBy() }</li> * <li>{@link MapMapping#valueQualifiedBy() }</li>
* </p> * </ul>
* <p> * Example:
* <code> * <pre>
* @Qualifier * &#64;Qualifier
* @Target(ElementType.METHOD) * &#64;Target(ElementType.METHOD)
* @Retention(RetentionPolicy.SOURCE) * &#64;Retention(RetentionPolicy.SOURCE)
* public @interface EnglishToGerman { * public &#64;interface EnglishToGerman {}
* } * </pre>
* </code>
* </p>
* *
* @author Sjaak Derksen * @author Sjaak Derksen
*/ */
@Target(ElementType.ANNOTATION_TYPE) @Target( ElementType.ANNOTATION_TYPE )
@Retention(RetentionPolicy.CLASS) @Retention( RetentionPolicy.CLASS )
public @interface Qualifier { public @interface Qualifier {
} }

View File

@ -37,17 +37,6 @@ import org.mapstruct.ap.option.Options;
/** /**
* This class provides the context for the builders. * This class provides the context for the builders.
*
* <p>
* The following builders make use of this context:
* <ul>
* <li>{@link BeanMappingMethod.Builder}</li>
* <li>{@link PropertyMappingMethod.Builder}</li>
* <li>{@link IterableMappingMethod.Builder}</li>
* <li>{@link MapMappingMethod.Builder}</li>
* <li>{@link EnumMappingMethod.Builder}</li>
* </ul>
* </p>
* <p> * <p>
* The context provides: * The context provides:
* <ul> * <ul>
@ -56,7 +45,6 @@ import org.mapstruct.ap.option.Options;
* <li>Means to harbor results produced by the builders, such as forged- and virtual mapping methods that should be * <li>Means to harbor results produced by the builders, such as forged- and virtual mapping methods that should be
* generated in a later stage.</li> * generated in a later stage.</li>
* </ul> * </ul>
* </p>
* *
* @author Sjaak Derksen * @author Sjaak Derksen
*/ */

View File

@ -38,17 +38,17 @@ import org.mapstruct.ap.util.Strings;
* It contains the source parameter, and all individual (nested) property entries. So consider the following * It contains the source parameter, and all individual (nested) property entries. So consider the following
* mapping method: * mapping method:
* *
* {@code * <pre>
* @Mapping( source = "in.propA.propB" target = "propC" ) * &#64;Mapping(source = "in.propA.propB" target = "propC")
* TypeB mappingMethod ( TypeA in ); * TypeB mappingMethod(TypeA in);
* } * </pre>
* *
* Then: * Then:
* <ol> * <ul>
* <li>{@link #parameter} will describe {@code in}</li> * <li>{@code parameter} will describe {@code in}</li>
* <li>{@link #propertyEntries[0]} will describe {@code propA}</li> * <li>{@code propertyEntries[0]} will describe {@code propA}</li>
* <li>{@link #propertyEntries[1]} will describe {@code propB}</li> * <li>{@code propertyEntries[1]} will describe {@code propB}</li>
* </ol> * </ul>
* *
* After building, {@link #isValid()} will return true when when no problems are detected during building. * After building, {@link #isValid()} will return true when when no problems are detected during building.
* *

View File

@ -18,6 +18,9 @@
*/ */
package org.mapstruct.ap.model.source.builtin; package org.mapstruct.ap.model.source.builtin;
import static org.mapstruct.ap.util.Collections.asSet;
import java.time.ZonedDateTime;
import java.util.Calendar; import java.util.Calendar;
import java.util.Set; import java.util.Set;
import java.util.TimeZone; import java.util.TimeZone;
@ -27,12 +30,9 @@ import org.mapstruct.ap.model.common.Type;
import org.mapstruct.ap.model.common.TypeFactory; import org.mapstruct.ap.model.common.TypeFactory;
import org.mapstruct.ap.util.JavaTimeConstants; import org.mapstruct.ap.util.JavaTimeConstants;
import static org.mapstruct.ap.util.Collections.asSet;
/** /**
* {@link BuiltInMethod} for mapping between {@link java.util.Calendar} * {@link BuiltInMethod} for mapping between {@link Calendar} and {@link ZonedDateTime}.
* and {@link java.time.ZonedDateTime}. * <p>
* <br />
* Template is at org.mapstruct.ap.model.builtin.CalendarToZonedDateTime.ftl * Template is at org.mapstruct.ap.model.builtin.CalendarToZonedDateTime.ftl
*/ */
public class CalendarToZonedDateTime extends BuiltInMethod { public class CalendarToZonedDateTime extends BuiltInMethod {

View File

@ -18,6 +18,7 @@
*/ */
package org.mapstruct.ap.model.source.builtin; package org.mapstruct.ap.model.source.builtin;
import java.time.ZonedDateTime;
import java.util.Calendar; import java.util.Calendar;
import java.util.Set; import java.util.Set;
@ -28,9 +29,8 @@ import org.mapstruct.ap.util.Collections;
import org.mapstruct.ap.util.JavaTimeConstants; import org.mapstruct.ap.util.JavaTimeConstants;
/** /**
* {@link BuiltInMethod} for mapping between {@link java.util.Calendar} * {@link BuiltInMethod} for mapping between {@link Calendar} and {@link ZonedDateTime}.
* and {@link java.time.ZonedDateTime}. * <p>
* <br />
* Template is at org.mapstruct.ap.model.builtin.ZonedDateTimeToCalendar.ftl * Template is at org.mapstruct.ap.model.builtin.ZonedDateTimeToCalendar.ftl
*/ */
public class ZonedDateTimeToCalendar extends BuiltInMethod { public class ZonedDateTimeToCalendar extends BuiltInMethod {

View File

@ -45,7 +45,6 @@ import org.mapstruct.ap.prism.QualifierPrism;
* removed from the list of potential mapping methods</li> * removed from the list of potential mapping methods</li>
* <li>If multiple qualifiers (qualifedBy) are specified, all should match to make a match.</li> * <li>If multiple qualifiers (qualifedBy) are specified, all should match to make a match.</li>
* </ol> * </ol>
* </p>
* *
* @author Sjaak Derksen * @author Sjaak Derksen
*/ */

View File

@ -36,7 +36,7 @@ public class SpecificCompilerWorkarounds {
/** /**
* Tests whether one type is a subtype of another. Any type is considered to be a subtype of itself. Also see <a * Tests whether one type is a subtype of another. Any type is considered to be a subtype of itself. Also see <a
* href="http://docs.oracle.com/javase/specs/jls/se8/html/jls-4.html">JLS section 4.10, Subtyping</a>. * href="http://docs.oracle.com/javase/specs/jls/se8/html/jls-4.html">JLS section 4.10, Subtyping</a>.
* <p /> * <p>
* Work-around for a bug related to sub-typing in the Eclipse JSR 269 implementation. * Work-around for a bug related to sub-typing in the Eclipse JSR 269 implementation.
* *
* @param types the type utils * @param types the type utils
@ -55,15 +55,15 @@ public class SpecificCompilerWorkarounds {
/** /**
* Returns the erasure of a type. * Returns the erasure of a type.
* <p/> * <p>
* Performs an additional test on the given type to check if it is not void. Calling * Performs an additional test on the given type to check if it is not void. Calling
* {@link Types#erasure(TypeMirror)} with a void kind type will create a ClassCastException in Eclipse JDT. * {@link Types#erasure(TypeMirror)} with a void kind type will create a ClassCastException in Eclipse JDT. See the
* JLS, section 4.6 Type Erasure, for reference.
* *
* @param types the type utils * @param types the type utils
* @param t the type to be erased * @param t the type to be erased
* @return the erasure of the given type * @return the erasure of the given type
* @throws IllegalArgumentException if given a package type * @throws IllegalArgumentException if given a package type
* @jls 4.6 Type Erasure
*/ */
public static TypeMirror erasure(Types types, TypeMirror t) { public static TypeMirror erasure(Types types, TypeMirror t) {
if ( t.getKind() == TypeKind.VOID || t.getKind() == TypeKind.NULL ) { if ( t.getKind() == TypeKind.VOID || t.getKind() == TypeKind.NULL ) {