#247 Re-enabling Doclint; Fixing JavaDoc errors

This commit is contained in:
Gunnar Morling 2014-06-28 12:39:54 +02:00
parent 4ed4853e86
commit ac7eb61c87
15 changed files with 33 additions and 28 deletions

View File

@ -54,7 +54,7 @@ public class Mappers {
* Returns an instance of the given mapper type. * Returns an instance of the given mapper type.
* *
* @param clazz The type of the mapper to return. * @param clazz The type of the mapper to return.
* * @param <T> The type of the mapper to create.
* @return An instance of the given mapper type. * @return An instance of the given mapper type.
*/ */
public static <T> T getMapper(Class<T> clazz) { public static <T> T getMapper(Class<T> clazz) {

View File

@ -40,7 +40,7 @@ public @interface Mapping {
* The source to use for this Mapping. This can either be: * The source to use for this Mapping. This can either be:
* <ol> * <ol>
* <li>The source name of the configured property as defined by the JavaBeans specification.</li> * <li>The source name of the configured property as defined by the JavaBeans specification.</li>
* <li>When used to map an enum constant, the name of the constant member is to be given<./li>. * <li>When used to map an enum constant, the name of the constant member is to be given.</li>
* </ol> * </ol>
* Either this attribute or {@link #constant()} or {@link #expression()} may be specified for a given mapping, * Either this attribute or {@link #constant()} or {@link #expression()} may be specified for a given mapping,
* but not two at the same time. If this attribute is given, the target property must be specified via * but not two at the same time. If this attribute is given, the target property must be specified via

View File

@ -38,7 +38,7 @@ public @interface Mapping {
* The source to use for this Mapping. This can either be: * The source to use for this Mapping. This can either be:
* <ol> * <ol>
* <li>The source name of the configured property as defined by the JavaBeans specification.</li> * <li>The source name of the configured property as defined by the JavaBeans specification.</li>
* <li>When used to map an enum constant, the name of the constant member is to be given<./li>. * <li>When used to map an enum constant, the name of the constant member is to be given.</li>
* </ol> * </ol>
* Either this attribute or {@link #constant()} or {@link #expression()} may be specified for a given mapping, * Either this attribute or {@link #constant()} or {@link #expression()} may be specified for a given mapping,
* but not two at the same time. If this attribute is given, the target property must be specified via * but not two at the same time. If this attribute is given, the target property must be specified via

View File

@ -60,7 +60,7 @@
${basedir}/../processor/src/main/java ${basedir}/../processor/src/main/java
</sourcepath> </sourcepath>
<links> <links>
<link>http://docs.oracle.com/javase/6/docs/api</link> <link>http://docs.oracle.com/javase/7/docs/api/</link>
</links> </links>
<packagesheader>MapStruct Packages</packagesheader> <packagesheader>MapStruct Packages</packagesheader>
<doctitle>MapStruct ${project.version}</doctitle> <doctitle>MapStruct ${project.version}</doctitle>

View File

@ -303,7 +303,7 @@
<artifactId>maven-javadoc-plugin</artifactId> <artifactId>maven-javadoc-plugin</artifactId>
<version>2.9</version> <version>2.9</version>
<configuration> <configuration>
<additionalparam>-Xdoclint:none</additionalparam> <excludePackageNames>org.mapstruct.ap.prism;org.mapstruct.itest.jaxb.xsd.*</excludePackageNames>
</configuration> </configuration>
</plugin> </plugin>
<plugin> <plugin>

View File

@ -39,6 +39,7 @@ import javax.lang.model.element.TypeElement;
import javax.lang.model.util.ElementKindVisitor6; import javax.lang.model.util.ElementKindVisitor6;
import javax.tools.Diagnostic.Kind; import javax.tools.Diagnostic.Kind;
import org.mapstruct.ap.model.Mapper;
import org.mapstruct.ap.option.Options; import org.mapstruct.ap.option.Options;
import org.mapstruct.ap.option.ReportingPolicy; import org.mapstruct.ap.option.ReportingPolicy;
import org.mapstruct.ap.processor.DefaultModelElementProcessorContext; import org.mapstruct.ap.processor.DefaultModelElementProcessorContext;

View File

@ -19,6 +19,7 @@
package org.mapstruct.ap.conversion; package org.mapstruct.ap.conversion;
import org.mapstruct.ap.model.Assignment; import org.mapstruct.ap.model.Assignment;
import org.mapstruct.ap.model.assignment.TypeConversion;
import org.mapstruct.ap.model.common.ConversionContext; import org.mapstruct.ap.model.common.ConversionContext;
/** /**

View File

@ -20,6 +20,7 @@ package org.mapstruct.ap.model;
import java.util.Set; import java.util.Set;
import org.mapstruct.ap.model.assignment.TypeConversion;
import org.mapstruct.ap.model.common.Parameter; import org.mapstruct.ap.model.common.Parameter;
import org.mapstruct.ap.model.common.Type; import org.mapstruct.ap.model.common.Type;
import org.mapstruct.ap.model.source.SourceMethod; import org.mapstruct.ap.model.source.SourceMethod;

View File

@ -20,6 +20,7 @@ package org.mapstruct.ap.model;
import java.util.Set; import java.util.Set;
import org.mapstruct.ap.model.assignment.TypeConversion;
import org.mapstruct.ap.model.common.Parameter; import org.mapstruct.ap.model.common.Parameter;
import org.mapstruct.ap.model.common.Type; import org.mapstruct.ap.model.common.Type;
import org.mapstruct.ap.model.source.SourceMethod; import org.mapstruct.ap.model.source.SourceMethod;

View File

@ -17,15 +17,12 @@
* limitations under the License. * limitations under the License.
*/ */
/** /**
* <p> * Meta-model of assignments. There are currently three types of assignment:
* Meta-model of assignments. There are currently three types of assignment
* <ul> * <ul>
* <li>Simple</li> * <li>Simple</li>
* <li>TypeConversion</li> * <li>TypeConversion</li>
* <li>MethodReference</li> * <li>MethodReference</li>
*
* The assignments can be wrapped. E.g. in a collection or map constructor, a null check, a try-catch, etc.
* </ul> * </ul>
* </p> * The assignments can be wrapped. E.g. in a collection or map constructor, a null check, a try-catch, etc.
*/ */
package org.mapstruct.ap.model.assignment; package org.mapstruct.ap.model.assignment;

View File

@ -18,6 +18,8 @@
*/ */
package org.mapstruct.ap.model.common; package org.mapstruct.ap.model.common;
import java.util.Date;
/** /**
* Context object passed to conversion providers and built-in methods. * Context object passed to conversion providers and built-in methods.
* *

View File

@ -35,6 +35,7 @@ import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap; import java.util.concurrent.ConcurrentMap;
import java.util.concurrent.ConcurrentNavigableMap; import java.util.concurrent.ConcurrentNavigableMap;
import java.util.concurrent.ConcurrentSkipListMap; import java.util.concurrent.ConcurrentSkipListMap;
import javax.lang.model.element.ElementKind; import javax.lang.model.element.ElementKind;
import javax.lang.model.element.ExecutableElement; import javax.lang.model.element.ExecutableElement;
import javax.lang.model.element.TypeElement; import javax.lang.model.element.TypeElement;
@ -180,14 +181,14 @@ public class TypeFactory {
/** /**
* Returns the Type that represents the declared Class type of the given type. For primitive types, the boxed class * Returns the Type that represents the declared Class type of the given type. For primitive types, the boxed class
* will be used. <br /> * will be used. Examples:
* Examples: <br /> * <ul>
* If type represents {@code java.lang.Integer}, it will return the type that represents {@code Class<Integer>}. * <li>If type represents {@code java.lang.Integer}, it will return the type that represents {@code Class<Integer>}.
* <br /> * </li>
* If type represents {@code int}, it will return the type that represents {@code Class<Integer>}. * <li>If type represents {@code int}, it will return the type that represents {@code Class<Integer>}.</li>
* </ul>
* *
* @param type the type to return the declared class type for * @param type the type to return the declared class type for
*
* @return the type representing {@code Class<type>}. * @return the type representing {@code Class<type>}.
*/ */
public Type classTypeOf(Type type) { public Type classTypeOf(Type type) {

View File

@ -21,6 +21,7 @@ package org.mapstruct.ap.model.source;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import javax.lang.model.element.TypeElement; import javax.lang.model.element.TypeElement;
import javax.lang.model.element.TypeParameterElement; import javax.lang.model.element.TypeParameterElement;
import javax.lang.model.element.VariableElement; import javax.lang.model.element.VariableElement;
@ -45,7 +46,7 @@ import org.mapstruct.ap.util.TypeUtilsJDK6Fix;
* SourceMethodHeader: SourceMethodModifiers TypeParameters Result SourceMethodDeclarator Throws * SourceMethodHeader: SourceMethodModifiers TypeParameters Result SourceMethodDeclarator Throws
* SourceMethodDeclarator: Identifier ( FormalParameterList ) * SourceMethodDeclarator: Identifier ( FormalParameterList )
* *
* example &lt;T extends String & Serializable&gt; T getResult(? extends T) throws Exception * example &lt;T extends String &amp; Serializable&gt; T getResult(? extends T) throws Exception
* \-------------------------------/ \-/ \---------/ * \-------------------------------/ \-/ \---------/
* TypeParameters Result ParameterList * TypeParameters Result ParameterList
* </pre> * </pre>
@ -55,8 +56,10 @@ import org.mapstruct.ap.util.TypeUtilsJDK6Fix;
* For more info on java-generics: http://www.javacodegeeks.com/2011/04/java-generics-quick-tutorial.html * For more info on java-generics: http://www.javacodegeeks.com/2011/04/java-generics-quick-tutorial.html
* http://www.angelikalanger.com/GenericsFAQ/FAQSections/ParameterizedTypes.html * http://www.angelikalanger.com/GenericsFAQ/FAQSections/ParameterizedTypes.html
* <p> * <p>
* The following situations is not supported / tested: <br/> * The following situations is not supported / tested:
* 1) Multiple bounds were the bound itself is again a generic type. * <ol>
* <li>Multiple bounds were the bound itself is again a generic type.</li>
* </ol>
* *
* @author Sjaak Derksen * @author Sjaak Derksen
*/ */

View File

@ -98,7 +98,7 @@ public interface ModelElementProcessor<P, R> {
* order from highest to lowest priority, starting with the mapping method * order from highest to lowest priority, starting with the mapping method
* retrieval processor (priority 1) and finishing with the code generation * retrieval processor (priority 1) and finishing with the code generation
* processor (priority 10000). Processors working on the built * processor (priority 10000). Processors working on the built
* {@code Mapper} model must have a priority > 1000. * {@code Mapper} model must have a priority &gt; 1000.
* *
* @return The priority value of this processor. * @return The priority value of this processor.
*/ */

View File

@ -23,7 +23,7 @@ import javax.lang.model.type.TypeMirror;
import javax.lang.model.util.Types; import javax.lang.model.util.Types;
/** /**
* * Work-around for a bug related to sub-typing in the Eclipse JSR 269 implementation.
* @author Sjaak Derksen * @author Sjaak Derksen
*/ */
public class TypeUtilsJDK6Fix { public class TypeUtilsJDK6Fix {
@ -31,16 +31,14 @@ public class TypeUtilsJDK6Fix {
private TypeUtilsJDK6Fix() { } private TypeUtilsJDK6Fix() { }
/** /**
* Tests whether one type is a subtype of another. * Tests whether one type is a subtype of another. Any type is considered to be a subtype of itself. Also see <a
* Any type is considered to be a subtype of itself. * href="http://docs.oracle.com/javase/specs/jls/se8/html/jls-4.html">JLS section 4.10, Subtyping</a>.
* *
* @param types the type utils * @param types the type utils
* @param t1 the first type * @param t1 the first type
* @param t2 the second type * @param t2 the second type
* @return {@code true} if and only if the first type is a subtype * @return {@code true} if and only if the first type is a subtype of the second
* of the second
* @throws IllegalArgumentException if given an executable or package type * @throws IllegalArgumentException if given an executable or package type
* @jls 4.10 Subtyping
*/ */
public static boolean isSubType(Types types, TypeMirror t1, TypeMirror t2) { public static boolean isSubType(Types types, TypeMirror t1, TypeMirror t2) {
return types.isSubtype( types.erasure( t1 ), types.erasure( t2 ) ); return types.isSubtype( types.erasure( t1 ), types.erasure( t2 ) );