You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tamaya.apache.org by po...@apache.org on 2016/12/29 20:52:48 UTC
incubator-tamaya-extensions git commit: TAMAYA-154: Fix javadoc error.
Repository: incubator-tamaya-extensions
Updated Branches:
refs/heads/master 7c01c6e87 -> a634bc6f2
TAMAYA-154: Fix javadoc error.
* There is still a problem with the long code blocks in Config.java
* LHF: fixed typos
Project: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/commit/a634bc6f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/tree/a634bc6f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/diff/a634bc6f
Branch: refs/heads/master
Commit: a634bc6f22f0c0626ae078bfef02e421c31df06a
Parents: 7c01c6e
Author: Phil Ottlinger <po...@apache.org>
Authored: Thu Dec 29 21:43:25 2016 +0100
Committer: Phil Ottlinger <po...@apache.org>
Committed: Thu Dec 29 21:43:25 2016 +0100
----------------------------------------------------------------------
.../org/apache/tamaya/inject/api/Config.java | 24 +++++++++++++-------
.../tamaya/inject/api/ConfigAutoInject.java | 10 ++++----
2 files changed, 21 insertions(+), 13 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/blob/a634bc6f/modules/injection/injection-api/src/main/java/org/apache/tamaya/inject/api/Config.java
----------------------------------------------------------------------
diff --git a/modules/injection/injection-api/src/main/java/org/apache/tamaya/inject/api/Config.java b/modules/injection/injection-api/src/main/java/org/apache/tamaya/inject/api/Config.java
index c182cb9..f78d3a2 100644
--- a/modules/injection/injection-api/src/main/java/org/apache/tamaya/inject/api/Config.java
+++ b/modules/injection/injection-api/src/main/java/org/apache/tamaya/inject/api/Config.java
@@ -33,15 +33,17 @@ import java.lang.annotation.Target;
*
* <h3>Simplest variant</h3>
* Below the most simple variant of a configured class is given:
+ * <pre>
* {@code
* package a.b;
*
- * pubic class ConfiguredItem{
+ * public class ConfiguredItem {
*
* @Config
* private String aValue;
* }
* }
+ * </pre>
* Configuration resolution is implemented as follows:
* <ul>
* <li>The current valid Configuration is evaluated by calling {@code Configuration cfg = ConfigurationProvider.getConfiguration();}</li>
@@ -54,32 +56,38 @@ import java.lang.annotation.Target;
*
* <h3>Explicit annotations</h3>
* In the next example we explicitly define the configuration keys to be used:
+ * <pre>
* {@code
* @ConfigDefaultSections("section1")
- * pubic class ConfiguredItem{
+ * public class ConfiguredItem {
*
- * @Config({"b", "[a.b.deprecated.keys]", "a"})
+ * @Config(value = {"b", "[a.b.deprecated.keys]", "a"})
* @ConfigDefault("myDefaultValue")
* private String aValue;
* }
+ * }
+ * </pre>
*
* Within this example we evaluate multiple possible keys: {@code section1.b, a.b.deprecated.keys, section1.a}.
- * Evaluation is aborted if a key could be successfully resolved. Hereby the ordering of the annotation values
- * define the ordering of resolution. If no value could be found, the configured default {@code myDefaultValue} is
+ * Evaluation is aborted if a key is resolved successfully. Hereby the ordering of the annotation values
+ * define the ordering of resolution. If no value can be found, the configured default {@code myDefaultValue} is
* injected.
*
* <h3>Using explicit field annotation only</h3>
* In the last example we explicitly define the configuration keys but omit the section part, letting the default
* section names to be taken:
+ * <pre>
* {@code
* package a.b;
*
- * pubic class ConfiguredItem{
+ * public class ConfiguredItem {
*
- * @Config({"b", "[a.b.deprecated.keys]", "a"})
+ * @Config(value = {"b", "[a.b.deprecated.keys]", "a"})
* @ConfigDefault("myDefaultValue")
* private String aValue;
* }
+ * }
+ * </pre>
*
* Key resolution is similar to above, but now the default package names are used, resulting in
* {@code a.b.ConfiguredItem.b, ConfiguredItem.b, a.b.deprecated.keys, a.b.ConfiguredItem.a, ConfiguredItem.a}
@@ -113,7 +121,7 @@ public @interface Config {
String defaultValue() default "";
/**
- * FLag that defines if a configuration property is required. If a required
+ * Flag that defines if a configuration property is required. If a required
* property is missing, a {@link org.apache.tamaya.ConfigException} is raised.
* Default is {@code true}.
* @return the flag value.
http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/blob/a634bc6f/modules/injection/injection-api/src/main/java/org/apache/tamaya/inject/api/ConfigAutoInject.java
----------------------------------------------------------------------
diff --git a/modules/injection/injection-api/src/main/java/org/apache/tamaya/inject/api/ConfigAutoInject.java b/modules/injection/injection-api/src/main/java/org/apache/tamaya/inject/api/ConfigAutoInject.java
index b8e9b0c..251caf9 100644
--- a/modules/injection/injection-api/src/main/java/org/apache/tamaya/inject/api/ConfigAutoInject.java
+++ b/modules/injection/injection-api/src/main/java/org/apache/tamaya/inject/api/ConfigAutoInject.java
@@ -27,7 +27,7 @@ import java.lang.annotation.Target;
* Adding this annotation tells the Tamaya injection system to inject all
* fields found, also including fields not annotated with {@code @Config}.
* The configuration keys to be used for resolution are basically determined
- * by the {@link Config} annotation(s). If missing the key are evaluated in the
+ * by the {@link Config} annotation(s). If missing the keys are evaluated in the
* following order:
* <ul>
* <li>packagename.simpleClassname.fieldName</li>
@@ -35,7 +35,7 @@ import java.lang.annotation.Target;
* <li>fieldName</li>
* </ul>
* Fields not to be injected can be annotated with {@code @NoConfig} to exclude
- * them being eleceted for injection.
+ * them being elected for injection.
* @see Config
*/
@Retention(RetentionPolicy.RUNTIME)
@@ -43,9 +43,9 @@ import java.lang.annotation.Target;
public @interface ConfigAutoInject {
/**
- * Flag that tells the injection system if {@link org.apache.tamaya.ConfigException} should
- * ne thrown when a property could not be resolved. Default is {@code false}.
- * @return
+ * Flag that tells the injection system if a {@link org.apache.tamaya.ConfigException} should
+ * be thrown when a property cannot be resolved. Default is {@code false}.
+ * @return {@code false} if no exception is thrown on unresolvable properties, {@code true} otherwise.
*/
boolean failIfMissing() default false;
}