cosmetic: fix javadoc warnings
diff --git a/src/main/java/org/apache/sling/models/annotations/Exporter.java b/src/main/java/org/apache/sling/models/annotations/Exporter.java
index 6470f91..169e3a6 100644
--- a/src/main/java/org/apache/sling/models/annotations/Exporter.java
+++ b/src/main/java/org/apache/sling/models/annotations/Exporter.java
@@ -30,21 +30,25 @@
/**
* Exporter name.
+ * @return Name
*/
String name();
/**
* The selector name under which the exporter servlet will be registered.
+ * @return Selector
*/
String selector() default "model";
/**
* Extensions under which the exporter servlet will be registered.
+ * @return Extensions
*/
String[] extensions();
/**
* Optional list of exporter options.
+ * @return Options
*/
ExporterOption[] options() default {};
diff --git a/src/main/java/org/apache/sling/models/annotations/ExporterOption.java b/src/main/java/org/apache/sling/models/annotations/ExporterOption.java
index d67813d..6932d2e 100644
--- a/src/main/java/org/apache/sling/models/annotations/ExporterOption.java
+++ b/src/main/java/org/apache/sling/models/annotations/ExporterOption.java
@@ -23,11 +23,13 @@
/**
* Name of the exporter option.
+ * @return Option name
*/
String name();
/**
* Value of the exporter option.
+ * @return Option value
*/
String value();
}
diff --git a/src/main/java/org/apache/sling/models/annotations/Exporters.java b/src/main/java/org/apache/sling/models/annotations/Exporters.java
index b38943f..4793cf8 100644
--- a/src/main/java/org/apache/sling/models/annotations/Exporters.java
+++ b/src/main/java/org/apache/sling/models/annotations/Exporters.java
@@ -30,6 +30,7 @@
/**
* List of exporters.
+ * @return Exporters
*/
Exporter[] value();
}
diff --git a/src/main/java/org/apache/sling/models/annotations/Via.java b/src/main/java/org/apache/sling/models/annotations/Via.java
index 91661aa..6978ed4 100644
--- a/src/main/java/org/apache/sling/models/annotations/Via.java
+++ b/src/main/java/org/apache/sling/models/annotations/Via.java
@@ -16,13 +16,13 @@
*/
package org.apache.sling.models.annotations;
-import org.apache.sling.models.annotations.via.BeanProperty;
-
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
+import org.apache.sling.models.annotations.via.BeanProperty;
+
/**
* Indicate that this injection point should be handled using some value
* derived from the adaptable.
@@ -33,11 +33,13 @@
/**
* A string value which the via provider uses to determine the correct adaptable.
+ * @return Via name
*/
public String value() default "";
/**
* The specific ViaProvider which will handle retrieval of the adaptable.
+ * @return Provider class
*/
public Class<? extends ViaProviderType> type() default BeanProperty.class;
diff --git a/src/main/java/org/apache/sling/models/annotations/injectorspecific/ChildResource.java b/src/main/java/org/apache/sling/models/annotations/injectorspecific/ChildResource.java
index b37e7da..87814dd 100644
--- a/src/main/java/org/apache/sling/models/annotations/injectorspecific/ChildResource.java
+++ b/src/main/java/org/apache/sling/models/annotations/injectorspecific/ChildResource.java
@@ -40,6 +40,7 @@
/**
* Specifies the name of the child resource.
* If empty or not set, then the name is derived from the method or field.
+ * @return Name
*/
public String name() default "";
@@ -47,6 +48,7 @@
* If set to true, the model can be instantiated even if there is no child resource
* with that name available.
* Default = false.
+ * @return Optional
* @deprecated Use {@link #injectionStrategy} instead.
*/
@Deprecated
@@ -62,12 +64,14 @@
* </ul>
* WARNING: Injection strategy is ignored if either {@link org.apache.sling.models.annotations.Optional}
* or {@link org.apache.sling.models.annotations.Required} is applied on the same element.
+ * @return Injection strategy
*/
public InjectionStrategy injectionStrategy() default InjectionStrategy.DEFAULT;
/**
* If set, then the child resource can be obtained via a projection of the given
* property of the adaptable.
+ * @return Via name
*/
public String via() default "";
diff --git a/src/main/java/org/apache/sling/models/annotations/injectorspecific/OSGiService.java b/src/main/java/org/apache/sling/models/annotations/injectorspecific/OSGiService.java
index cb80d8d..10c92b8 100644
--- a/src/main/java/org/apache/sling/models/annotations/injectorspecific/OSGiService.java
+++ b/src/main/java/org/apache/sling/models/annotations/injectorspecific/OSGiService.java
@@ -37,7 +37,8 @@
@Source("osgi-services")
public @interface OSGiService {
/**
- * specifies the RFC 1960-based filter string, which is evaluated when retrieving the service. If empty string or left out, then no filtering is being performed.
+ * Specifies the RFC 1960-based filter string, which is evaluated when retrieving the service. If empty string or left out, then no filtering is being performed.
+ * @return Filter string
*
* @see "Core Specification, section 5.5, for a description of the filter string"
* @see <a href="http://www.ietf.org/rfc/rfc1960.txt">RFC 1960</a>
@@ -47,6 +48,7 @@
/**
* If set to true, the model can be instantiated even if there is no OSGi service implementation available. Default
* = false.
+ * @return Optional
* @deprecated Use {@link #injectionStrategy} instead.
*/
@Deprecated
@@ -62,6 +64,7 @@
* </ul>
* WARNING: Injection strategy is ignored if either {@link org.apache.sling.models.annotations.Optional}
* or {@link org.apache.sling.models.annotations.Required} is applied on the same element.
+ * @return Injection strategy
*/
public InjectionStrategy injectionStrategy() default InjectionStrategy.DEFAULT;
}
diff --git a/src/main/java/org/apache/sling/models/annotations/injectorspecific/RequestAttribute.java b/src/main/java/org/apache/sling/models/annotations/injectorspecific/RequestAttribute.java
index 1567dd6..bc82188 100644
--- a/src/main/java/org/apache/sling/models/annotations/injectorspecific/RequestAttribute.java
+++ b/src/main/java/org/apache/sling/models/annotations/injectorspecific/RequestAttribute.java
@@ -41,6 +41,7 @@
/**
* Specifies the name of the request attribute. If empty or not set, then the name
* is derived from the method or field.
+ * @return Name
*/
public String name() default "";
@@ -48,6 +49,7 @@
* If set to true, the model can be instantiated even if there is no request attribute
* with the given name found.
* Default = false.
+ * @return Optional
* @deprecated Use {@link #injectionStrategy} instead.
*/
@Deprecated
@@ -63,6 +65,7 @@
* </ul>
* WARNING: Injection strategy is ignored if either {@link org.apache.sling.models.annotations.Optional}
* or {@link org.apache.sling.models.annotations.Required} is applied on the same element.
+ * @return Injection strategy
*/
public InjectionStrategy injectionStrategy() default InjectionStrategy.DEFAULT;
}
diff --git a/src/main/java/org/apache/sling/models/annotations/injectorspecific/ResourcePath.java b/src/main/java/org/apache/sling/models/annotations/injectorspecific/ResourcePath.java
index fb7cc0d..a2a33a7 100644
--- a/src/main/java/org/apache/sling/models/annotations/injectorspecific/ResourcePath.java
+++ b/src/main/java/org/apache/sling/models/annotations/injectorspecific/ResourcePath.java
@@ -39,17 +39,20 @@
/**
* Specifies the path of the resource. If not provided, the path is derived from the property name.
+ * @return Path
*/
public String path() default "";
/**
* Specifies more than one path for the resource. If not provided, a single path is derived from the property name.
+ * @return Paths
*/
public String[] paths() default {};
/**
* Specifies the name of the property containing the resource path. If empty or not set, then the name
* is derived from the method or field.
+ * @return Name
*/
public String name() default "";
@@ -57,6 +60,7 @@
* If set to true, the model can be instantiated even if there is no request attribute
* with the given name found.
* Default = false.
+ * @return Optional
* @deprecated Use {@link #injectionStrategy} instead.
*/
@Deprecated
@@ -72,6 +76,7 @@
* </ul>
* WARNING: Injection strategy is ignored if either {@link org.apache.sling.models.annotations.Optional}
* or {@link org.apache.sling.models.annotations.Required} is applied on the same element.
+ * @return Injection strategy
*/
public InjectionStrategy injectionStrategy() default InjectionStrategy.DEFAULT;
diff --git a/src/main/java/org/apache/sling/models/annotations/injectorspecific/ScriptVariable.java b/src/main/java/org/apache/sling/models/annotations/injectorspecific/ScriptVariable.java
index 93a96a7..980cec5 100644
--- a/src/main/java/org/apache/sling/models/annotations/injectorspecific/ScriptVariable.java
+++ b/src/main/java/org/apache/sling/models/annotations/injectorspecific/ScriptVariable.java
@@ -40,6 +40,7 @@
/**
* Specifies the name of the script variable.
* If empty or not set, then the name is derived from the method or field.
+ * @return Name
*/
public String name() default "";
@@ -47,6 +48,7 @@
* If set to true, the model can be instantiated even if there is no
* scripting value with the specified name.
* Default = false.
+ * @return Optional
* @deprecated Use {@link #injectionStrategy} instead.
*/
@Deprecated
@@ -62,6 +64,7 @@
* </ul>
* WARNING: Injection strategy is ignored if either {@link org.apache.sling.models.annotations.Optional}
* or {@link org.apache.sling.models.annotations.Required} is applied on the same element.
+ * @return Injection strategy
*/
public InjectionStrategy injectionStrategy() default InjectionStrategy.DEFAULT;
}
diff --git a/src/main/java/org/apache/sling/models/annotations/injectorspecific/Self.java b/src/main/java/org/apache/sling/models/annotations/injectorspecific/Self.java
index 945457f..45aea56 100644
--- a/src/main/java/org/apache/sling/models/annotations/injectorspecific/Self.java
+++ b/src/main/java/org/apache/sling/models/annotations/injectorspecific/Self.java
@@ -40,6 +40,7 @@
/**
* If set to true, the model can be instantiated even if there is no object that can be adapted from the adaptable itself.
* Default = false.
+ * @return Optional
* @deprecated Use {@link #injectionStrategy} instead
*/
@Deprecated
@@ -55,6 +56,7 @@
* </ul>
* WARNING: Injection strategy is ignored if either {@link org.apache.sling.models.annotations.Optional}
* or {@link org.apache.sling.models.annotations.Required} is applied on the same element.
+ * @return Injection strategy
*/
public InjectionStrategy injectionStrategy() default InjectionStrategy.DEFAULT;
diff --git a/src/main/java/org/apache/sling/models/annotations/injectorspecific/SlingObject.java b/src/main/java/org/apache/sling/models/annotations/injectorspecific/SlingObject.java
index 2a1409d..4350551 100644
--- a/src/main/java/org/apache/sling/models/annotations/injectorspecific/SlingObject.java
+++ b/src/main/java/org/apache/sling/models/annotations/injectorspecific/SlingObject.java
@@ -87,6 +87,7 @@
* If set to true, the model can be instantiated even if there is no request attribute
* with the given name found.
* Default = false.
+ * @return Optional
* @deprecated Use {@link #injectionStrategy} instead
*/
@Deprecated
@@ -102,6 +103,7 @@
* </ul>
* WARNING: Injection strategy is ignored if either {@link org.apache.sling.models.annotations.Optional}
* or {@link org.apache.sling.models.annotations.Required} is applied on the same element.
+ * @return Injection strategy
*/
public InjectionStrategy injectionStrategy() default InjectionStrategy.DEFAULT;
diff --git a/src/main/java/org/apache/sling/models/annotations/injectorspecific/ValueMapValue.java b/src/main/java/org/apache/sling/models/annotations/injectorspecific/ValueMapValue.java
index 3495bf0..5601327 100644
--- a/src/main/java/org/apache/sling/models/annotations/injectorspecific/ValueMapValue.java
+++ b/src/main/java/org/apache/sling/models/annotations/injectorspecific/ValueMapValue.java
@@ -40,6 +40,7 @@
/**
* Specifies the name of the value from the value map to take.
* If empty, then the name is derived from the method or field.
+ * @return Name
*/
String name() default "";
@@ -47,6 +48,7 @@
* If set to true, the model can be instantiated even if that value is missing.
* Only considered if default is not set, because any default value implicitly
* sets optional to true
+ * @return Optional
* @deprecated Use {@link #injectionStrategy} instead
*/
@Deprecated
@@ -62,12 +64,14 @@
* </ul>
* WARNING: Injection strategy is ignored if either {@link org.apache.sling.models.annotations.Optional}
* or {@link org.apache.sling.models.annotations.Required} is applied on the same element.
+ * @return Injection strategy
*/
InjectionStrategy injectionStrategy() default InjectionStrategy.DEFAULT;
/**
* If set, then the child resource can be obtained via a projection of the given
* property of the adaptable.
+ * @return Via name
*/
String via() default "";
}
diff --git a/src/main/java/org/apache/sling/models/factory/ModelFactory.java b/src/main/java/org/apache/sling/models/factory/ModelFactory.java
index c50ab2e..db66509 100644
--- a/src/main/java/org/apache/sling/models/factory/ModelFactory.java
+++ b/src/main/java/org/apache/sling/models/factory/ModelFactory.java
@@ -37,6 +37,7 @@
* Instantiates the given Sling Model class from the given adaptable.
* @param adaptable the adaptable to use to instantiate the Sling Model Class
* @param type the class to instantiate
+ * @param <ModelType> Model type
* @return a new instance for the required model (never {@code null})
* @throws MissingElementsException in case no injector was able to inject some required values with the given types
* @throws InvalidAdaptableException in case the given class cannot be instantiated from the given adaptable (different adaptable on the model annotation)
@@ -55,6 +56,7 @@
* @param request the current request
* @param resource the resource to set as the wrapped request's resource
* @param targetClass the class to instantiate
+ * @param <T> Model type
* @return a new instance for the required model (never {@code null})
* @throws MissingElementsException in case no injector was able to inject some required values with the given types
* @throws InvalidAdaptableException in case the given class cannot be instantiated from the given adaptable (different adaptable on the model annotation)
@@ -68,7 +70,7 @@
public @NotNull <T> T createModelFromWrappedRequest(@NotNull SlingHttpServletRequest request, @NotNull Resource resource, @NotNull Class<T> targetClass);
/**
- *
+ *
* @param adaptable the adaptable to check
* @param type the class to check
* @return {@code true} in case the given class can be created from the given adaptable, otherwise {@code false}
@@ -76,11 +78,11 @@
public boolean canCreateFromAdaptable(@NotNull Object adaptable, @NotNull Class<?> type);
/**
- *
+ *
* @param adaptable the adaptable to check
* @param type the class to check
* @return false in case no class with the Model annotation adapts to the requested type
- *
+ *
* @see org.apache.sling.models.annotations.Model
* @deprecated Use {@link #isModelClass(Class)} instead!
*/
@@ -95,8 +97,8 @@
* </ul>
* Only if both conditions are fulfilled this method will return {@code true}.
* @param type the class to check
- * @return {@code true} in case the given type can be instantiated though Sling Models.
- *
+ * @return {@code true} in case the given type can be instantiated though Sling Models.
+ *
*/
public boolean isModelClass(@NotNull Class<?> type);
@@ -202,7 +204,7 @@
* @throws ExportException if the export fails
* @throws MissingExporterException if the named exporter can't be found
*/
- public @NotNull <T> T exportModelForRequest(@NotNull SlingHttpServletRequest request, @NotNull String exporterName,
+ public @NotNull <T> T exportModelForRequest(@NotNull SlingHttpServletRequest request, @NotNull String exporterName,
@NotNull Class<T> targetClass, @NotNull Map<String, String> options) throws MissingElementsException,
InvalidAdaptableException, ModelClassException, PostConstructException, ValidationException, InvalidModelException,
ExportException, MissingExporterException;
diff --git a/src/main/java/org/apache/sling/models/spi/ModelValidation.java b/src/main/java/org/apache/sling/models/spi/ModelValidation.java
index 01b4124..db84b4d 100644
--- a/src/main/java/org/apache/sling/models/spi/ModelValidation.java
+++ b/src/main/java/org/apache/sling/models/spi/ModelValidation.java
@@ -28,7 +28,8 @@
* @param adaptable the adaptable about to be used instantiate the Sling Model Class
* @param modelClass the class of the model which is about to be instantiated
* @param required if {@code true} validation fails even if validation model can't be found.
- * @return {@code null} if validation was successful, otherwise either {@link ValidationException}
+ * @param <ModelType> Model type
+ * @return {@code null} if validation was successful, otherwise either {@link ValidationException}
* in case validation could not be performed for some reason (e.g. no validation information available)
* or {@link InvalidModelException} in case the given model type could not be validated through the {@link ModelValidation}.
*/