diff --git a/core/src/main/java/org/mapstruct/package-info.java b/core/src/main/java/org/mapstruct/package-info.java new file mode 100644 index 000000000..54edfe110 --- /dev/null +++ b/core/src/main/java/org/mapstruct/package-info.java @@ -0,0 +1,31 @@ +/** + * Copyright 2012-2013 Gunnar Morling (http://www.gunnarmorling.de/) + * and/or other contributors as indicated by the @authors tag. See the + * copyright.txt file in the distribution for a full listing of all + * contributors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/** + *

+ * MapStruct is a code generator which simplifies the implementation of mappings between Java bean types by generating + * mapping code at compile time, following a convention-over-configuration approach. The generated code uses plain + * method invocations and thus is fast and type-safe. + *

+ *

+ * This package contains several annotations which allow to configure how mapper interfaces are generated. + *

+ * + * @see MapStruct reference documentation + */ +package org.mapstruct; diff --git a/distribution/pom.xml b/distribution/pom.xml index 2b214a55a..7349de1a7 100644 --- a/distribution/pom.xml +++ b/distribution/pom.xml @@ -62,9 +62,13 @@ MapStruct Packages MapStruct ${project.version} MapStruct ${project.version} + + Gunnar Morling; All rights reserved. Released under the Apache Software License 2.0.]]> + + - MapStruct + MapStruct API org.mapstruct* diff --git a/processor/pom.xml b/processor/pom.xml index 4c560011c..f4b3ee554 100644 --- a/processor/pom.xml +++ b/processor/pom.xml @@ -40,15 +40,21 @@ + org.freemarker freemarker + + com.jolira hickory provided + + ${project.groupId} mapstruct diff --git a/processor/src/main/java/org/mapstruct/ap/conversion/Conversions.java b/processor/src/main/java/org/mapstruct/ap/conversion/Conversions.java index 7601c6b88..f5262255f 100644 --- a/processor/src/main/java/org/mapstruct/ap/conversion/Conversions.java +++ b/processor/src/main/java/org/mapstruct/ap/conversion/Conversions.java @@ -29,6 +29,11 @@ import org.mapstruct.ap.util.TypeUtil; import static org.mapstruct.ap.conversion.ReverseConversion.reverse; +/** + * Holds built-in {@link Conversion}s such as from {@code int} to {@code String}. + * + * @author Gunnar Morling + */ public class Conversions { private TypeUtil typeUtil; diff --git a/processor/src/main/java/org/mapstruct/ap/model/source/MappedProperty.java b/processor/src/main/java/org/mapstruct/ap/model/source/MappedProperty.java index 1c0714a6a..6988f8b3a 100644 --- a/processor/src/main/java/org/mapstruct/ap/model/source/MappedProperty.java +++ b/processor/src/main/java/org/mapstruct/ap/model/source/MappedProperty.java @@ -20,6 +20,12 @@ package org.mapstruct.ap.model.source; import org.mapstruct.ap.model.Type; +/** + * Represents a property mapped from source to target with the names of its + * accessor methods. + * + * @author Gunnar Morling + */ public class MappedProperty { private final String sourceName; diff --git a/processor/src/main/java/org/mapstruct/ap/model/source/Mapping.java b/processor/src/main/java/org/mapstruct/ap/model/source/Mapping.java index 1dbdb15a4..3c2defc5e 100644 --- a/processor/src/main/java/org/mapstruct/ap/model/source/Mapping.java +++ b/processor/src/main/java/org/mapstruct/ap/model/source/Mapping.java @@ -21,6 +21,11 @@ package org.mapstruct.ap.model.source; import javax.lang.model.element.AnnotationMirror; import javax.lang.model.element.AnnotationValue; +/** + * Represents a property mapping as configured via {@code @Mapping}. + * + * @author Gunnar Morling + */ public class Mapping { private final String sourceName; diff --git a/processor/src/main/java/org/mapstruct/ap/model/source/Method.java b/processor/src/main/java/org/mapstruct/ap/model/source/Method.java index 3bd2e79d0..4d9bf9c2a 100644 --- a/processor/src/main/java/org/mapstruct/ap/model/source/Method.java +++ b/processor/src/main/java/org/mapstruct/ap/model/source/Method.java @@ -23,7 +23,12 @@ import javax.lang.model.element.ExecutableElement; import org.mapstruct.ap.model.Type; - +/** + * Represents a mapping method with source and target type and the mappings + * between the properties of source and target type. + * + * @author Gunnar Morling + */ public class Method { private final Type declaringMapper; diff --git a/processor/src/main/java/org/mapstruct/ap/model/source/Parameter.java b/processor/src/main/java/org/mapstruct/ap/model/source/Parameter.java index 3d65e1c5d..7406b0ac4 100644 --- a/processor/src/main/java/org/mapstruct/ap/model/source/Parameter.java +++ b/processor/src/main/java/org/mapstruct/ap/model/source/Parameter.java @@ -20,6 +20,11 @@ package org.mapstruct.ap.model.source; import org.mapstruct.ap.model.Type; +/** + * A parameter of a mapping method. + * + * @author Gunnar Morling + */ public class Parameter { private final String name; diff --git a/processor/src/main/java/org/mapstruct/ap/package-info.java b/processor/src/main/java/org/mapstruct/ap/package-info.java new file mode 100644 index 000000000..5110b2a3a --- /dev/null +++ b/processor/src/main/java/org/mapstruct/ap/package-info.java @@ -0,0 +1,25 @@ +/** + * Copyright 2012-2013 Gunnar Morling (http://www.gunnarmorling.de/) + * and/or other contributors as indicated by the @authors tag. See the + * copyright.txt file in the distribution for a full listing of all + * contributors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/** + *

+ * This package and it sub-packages contain the implementation of the MapStruct annotation processor. Application code + * using MapStruct should never work with these types directly. + *

+ */ +package org.mapstruct.ap;