You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tamaya.apache.org by an...@apache.org on 2016/01/21 07:21:42 UTC

incubator-tamaya git commit: TAMAYA-134: Javadoc improvements by Philipp Ottlinger.

Repository: incubator-tamaya
Updated Branches:
  refs/heads/master 293d242c8 -> e9c776266


TAMAYA-134: Javadoc improvements by Philipp Ottlinger.


Project: http://git-wip-us.apache.org/repos/asf/incubator-tamaya/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tamaya/commit/e9c77626
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tamaya/tree/e9c77626
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tamaya/diff/e9c77626

Branch: refs/heads/master
Commit: e9c7762667a728940fec190bc4a47d865eb5ed4c
Parents: 293d242
Author: anatole <an...@apache.org>
Authored: Thu Jan 21 07:21:35 2016 +0100
Committer: anatole <an...@apache.org>
Committed: Thu Jan 21 07:21:35 2016 +0100

----------------------------------------------------------------------
 .../org/apache/tamaya/inject/api/Config.java    |  2 ++
 .../inject/api/ConfiguredItemSupplier.java      | 10 +++++-----
 .../tamaya/inject/api/InjectionUtils.java       | 12 ++++++-----
 .../tamaya/inject/api/WithConfigOperator.java   |  7 ++++---
 .../inject/api/WithPropertyConverter.java       |  3 ++-
 .../tamaya/inject/ConfigurationInjector.java    | 21 ++++++++++++++------
 6 files changed, 35 insertions(+), 20 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/e9c77626/modules/injection-api/src/main/java/org/apache/tamaya/inject/api/Config.java
----------------------------------------------------------------------
diff --git a/modules/injection-api/src/main/java/org/apache/tamaya/inject/api/Config.java b/modules/injection-api/src/main/java/org/apache/tamaya/inject/api/Config.java
index cceddad..2484934 100644
--- a/modules/injection-api/src/main/java/org/apache/tamaya/inject/api/Config.java
+++ b/modules/injection-api/src/main/java/org/apache/tamaya/inject/api/Config.java
@@ -84,6 +84,8 @@ public @interface Config {
      * default values can be fixed Strings or even themselves resolvable. For typed configuration of type T entries
      * that are not Strings the default value must be a valid input to the corresponding
      * {@link org.apache.tamaya.spi.PropertyConverter}.
+     * 
+     * @return default value used in case resolution fails.
      */
     @Nonbinding
     String defaultValue() default "";

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/e9c77626/modules/injection-api/src/main/java/org/apache/tamaya/inject/api/ConfiguredItemSupplier.java
----------------------------------------------------------------------
diff --git a/modules/injection-api/src/main/java/org/apache/tamaya/inject/api/ConfiguredItemSupplier.java b/modules/injection-api/src/main/java/org/apache/tamaya/inject/api/ConfiguredItemSupplier.java
index 4775ef6..5e57121 100644
--- a/modules/injection-api/src/main/java/org/apache/tamaya/inject/api/ConfiguredItemSupplier.java
+++ b/modules/injection-api/src/main/java/org/apache/tamaya/inject/api/ConfiguredItemSupplier.java
@@ -20,11 +20,11 @@ package org.apache.tamaya.inject.api;
 
 /**
  * Represents a supplier of results.
- * <p>
- * <p>There is no requirement that a new or distinct result be returned each
+ * 
+ * There is no requirement that a new or distinct result be returned each
  * time the supplier is invoked.
- * <p>
- * <p>This is a functional interface,
+ * 
+ * This is a functional interface,
  * whose functional method is {@link #get()}.
  *
  * @param <T> the type of results supplied by this supplier
@@ -38,4 +38,4 @@ public interface ConfiguredItemSupplier<T> {
      * @return a result
      */
     T get();
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/e9c77626/modules/injection-api/src/main/java/org/apache/tamaya/inject/api/InjectionUtils.java
----------------------------------------------------------------------
diff --git a/modules/injection-api/src/main/java/org/apache/tamaya/inject/api/InjectionUtils.java b/modules/injection-api/src/main/java/org/apache/tamaya/inject/api/InjectionUtils.java
index 5250f32..1e2cd6e 100644
--- a/modules/injection-api/src/main/java/org/apache/tamaya/inject/api/InjectionUtils.java
+++ b/modules/injection-api/src/main/java/org/apache/tamaya/inject/api/InjectionUtils.java
@@ -57,10 +57,11 @@ public final class InjectionUtils {
     }
 
     /**
-     * Evaluates all absolute configuration key based on the member name found.
+     * Evaluates all absolute configuration keys based on the member name found.
      *
-     * @param areasAnnot the (optional) annotation definining areas to be looked up.
-     * @return the list current keys in order how they should be processed/looked up.
+     * @param member member to analyze.
+     * @param areasAnnot the (optional) annotation defining areas to be looked up.
+     * @return the list of current keys in order how they should be processed/looked up.
      */
     public static List<String> evaluateKeys(Member member, ConfigDefaultSections areasAnnot) {
         List<String> keys = new ArrayList<>();
@@ -86,8 +87,9 @@ public final class InjectionUtils {
     }
 
     /**
-     * Evaluates all absolute configuration key based on the annotations found on a class.
-     *
+     * Evaluates all absolute configuration keys based on the annotations found in a class.
+     * 
+     * @param member member to analyze.
      * @param areasAnnot         the (optional) annotation definining areas to be looked up.
      * @param propertyAnnotation the annotation on field/method level that may defined one or
      *                           several keys to be looked up (in absolute or relative form).

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/e9c77626/modules/injection-api/src/main/java/org/apache/tamaya/inject/api/WithConfigOperator.java
----------------------------------------------------------------------
diff --git a/modules/injection-api/src/main/java/org/apache/tamaya/inject/api/WithConfigOperator.java b/modules/injection-api/src/main/java/org/apache/tamaya/inject/api/WithConfigOperator.java
index 0574de8..cc3d731 100644
--- a/modules/injection-api/src/main/java/org/apache/tamaya/inject/api/WithConfigOperator.java
+++ b/modules/injection-api/src/main/java/org/apache/tamaya/inject/api/WithConfigOperator.java
@@ -26,8 +26,8 @@ import java.lang.annotation.RetentionPolicy;
 import java.lang.annotation.Target;
 
 /**
- * Annotation to define an configuration operator to be used before accessing a configured keys.
- * This allows filtering current configuration, e.g. for realizing views or ensuring security
+ * Annotation to define an configuration operator to be used before accessing a configured key.
+ * This allows filtering the current configuration, e.g. to realize views or ensure security
  * constraints.
  */
 @Retention(RetentionPolicy.RUNTIME)
@@ -38,7 +38,8 @@ public @interface WithConfigOperator {
      * Define a custom adapter that should be used to adapt the configuration entry injected. This overrides any
      * general org.apache.tamaya.core.internal registered. If no adapter is defined (default) and no corresponding adapter is
      * registered, it is handled as a deployment error.
+     * @return adapter used to transform the configuration entry.
      */
-    Class<? extends ConfigOperator> value();
+	Class<? extends ConfigOperator> value();
 
 }

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/e9c77626/modules/injection-api/src/main/java/org/apache/tamaya/inject/api/WithPropertyConverter.java
----------------------------------------------------------------------
diff --git a/modules/injection-api/src/main/java/org/apache/tamaya/inject/api/WithPropertyConverter.java b/modules/injection-api/src/main/java/org/apache/tamaya/inject/api/WithPropertyConverter.java
index 7abd8df..499360c 100644
--- a/modules/injection-api/src/main/java/org/apache/tamaya/inject/api/WithPropertyConverter.java
+++ b/modules/injection-api/src/main/java/org/apache/tamaya/inject/api/WithPropertyConverter.java
@@ -27,7 +27,7 @@ import java.lang.annotation.RetentionPolicy;
 import java.lang.annotation.Target;
 
 /**
- * Annotation to define a type adapter to be used before injecting a configured keys, or for applying changes.
+ * Annotation to define a type adapter to be used before injecting a configured key, or for applying changes.
  * This will override any other adapter for performing the type conversion before
  * injecting the field keys.
  */
@@ -39,6 +39,7 @@ public @interface WithPropertyConverter {
      * Define a custom adapter or codec that should be used to adapt the configuration entry injected. This overrides any
      * general org.apache.tamaya.core.internal registered. If no adapter is defined (default) and no corresponding adapter is
      * registered, it is handled as a deployment error.
+     * @return adapter used to change the configuration entry.
      */
     Class<? extends PropertyConverter<?>> value();
 

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/e9c77626/modules/injection/src/main/java/org/apache/tamaya/inject/ConfigurationInjector.java
----------------------------------------------------------------------
diff --git a/modules/injection/src/main/java/org/apache/tamaya/inject/ConfigurationInjector.java b/modules/injection/src/main/java/org/apache/tamaya/inject/ConfigurationInjector.java
index ff26972..9a3fe5c 100644
--- a/modules/injection/src/main/java/org/apache/tamaya/inject/ConfigurationInjector.java
+++ b/modules/injection/src/main/java/org/apache/tamaya/inject/ConfigurationInjector.java
@@ -28,18 +28,20 @@ import org.apache.tamaya.inject.api.ConfiguredItemSupplier;
 public interface ConfigurationInjector {
 
     /**
-     * Configured the current instance and reigsterd necessary listener to forward config change events as
+     * Configures the current instance and registers necessary listener to forward config change events as
      * defined by the current annotations in place.
-     *
+     * 
+     * @param <T> the type of the instance.
      * @param instance the instance to be configured
      * @return the configured instance (allows chaining of operations).
      */
     <T> T configure(T instance);
 
     /**
-     * Configured the current instance and reigsterd necessary listener to forward config change events as
+     * Configures the current instance and registers necessary listener to forward config change events as
      * defined by the current annotations in place.
      *
+     * @param <T> the type of the instance.
      * @param instance the instance to be configured
      * @param config the configuration to be used for injection.
      * @return the configured instance (allows chaining of operations).
@@ -47,22 +49,28 @@ public interface ConfigurationInjector {
     <T> T configure(T instance, Configuration config);
 
     /**
-     * Create a template implementting the annotated methods based on current configuration data.
-     *
+     * Creates a template implementing the annotated methods based on current configuration data.
+     * 
+     * @param <T> the type of the template.
      * @param templateType the type of the template to be created.
+     * @return the configured template.
      */
     <T> T createTemplate(Class<T> templateType);
 
     /**
-     * Create a template implementting the annotated methods based on current configuration data.
+     * Creates a template implementting the annotated methods based on current configuration data.
+     * 
+     * @param <T> the type of the template.
      * @param config the configuration to be used for backing the template.
      * @param templateType the type of the template to be created.
+     * @return the configured template.
      */
     <T> T createTemplate(Class<T> templateType, Configuration config);
 
 
     /**
      * Creates a supplier for configured instances of the given type {@code T}.
+     * 
      * @param supplier the supplier to create new instances.
      * @param <T> the target type.
      * @return a supplier creating configured instances of {@code T}.
@@ -71,6 +79,7 @@ public interface ConfigurationInjector {
 
     /**
      * Creates a supplier for configured instances of the given type {@code T}.
+     * 
      * @param supplier the supplier to create new instances.
      * @param config the configuration to be used for backing the supplier.
      * @param <T> the target type.