diff options
author | Bob Lee <crazybob@crazybob.org> | 2009-10-03 15:10:49 +0000 |
---|---|---|
committer | Bob Lee <crazybob@crazybob.org> | 2009-10-03 15:10:49 +0000 |
commit | 60ee76710fb0426695824861e60a1d7c9eb54196 (patch) | |
tree | 19f20533574b8b11787f5a9010858a151528a738 | |
parent | 6c55a62630b1af1438c0e4b9a5d91a04811e5394 (diff) | |
download | platform_external_jsr330-60ee76710fb0426695824861e60a1d7c9eb54196.tar.gz platform_external_jsr330-60ee76710fb0426695824861e60a1d7c9eb54196.tar.bz2 platform_external_jsr330-60ee76710fb0426695824861e60a1d7c9eb54196.zip |
Made rule about injecting T or a subtype of T more precise.
git-svn-id: https://atinject.googlecode.com/svn/trunk@50 3bc8319c-20ab-11de-9edc-3f40a397ab60
-rw-r--r-- | atinject.ipr | 5 | ||||
-rw-r--r-- | src/javax/inject/Inject.java | 17 |
2 files changed, 16 insertions, 6 deletions
diff --git a/atinject.ipr b/atinject.ipr index 716284b..5caf3de 100644 --- a/atinject.ipr +++ b/atinject.ipr @@ -223,7 +223,7 @@ </component> <component name="ProjectFileVersion" converted="true" /> <component name="ProjectKey"> - <option name="state" value="project:///Users/crazybob/projects/atinject/atinject.ipr" /> + <option name="state" value="https://atinject.googlecode.com/svn/trunk/atinject.ipr" /> </component> <component name="ProjectModuleManager"> <modules> @@ -252,6 +252,9 @@ <option name="myVersion" value="124" /> <option name="mySupportsUserInfoFilter" value="true" /> </component> + <component name="VcsDirectoryMappings"> + <mapping directory="" vcs="svn" /> + </component> <component name="libraryTable"> <library name="Guice"> <CLASSES> diff --git a/src/javax/inject/Inject.java b/src/javax/inject/Inject.java index 7dc7b76..29e431b 100644 --- a/src/javax/inject/Inject.java +++ b/src/javax/inject/Inject.java @@ -31,10 +31,6 @@ import static java.lang.annotation.ElementType.FIELD; * injected first, followed by fields, and then methods. Fields and methods * in superclasses are injected before those in subclasses. Ordering of * injection among fields and among methods in the same class is not specified. - * For a given type T and optional qualifier, an injector must - * be able to inject a user-specified subtype of T that has an injectable - * constructor. Beyond that, which values are injected depend upon the - * injector implementation and its configuration. * * <p>Injectable constructors are annotated with {@code @Inject} and accept * zero or more dependencies as arguments. {@code @Inject} can apply to at most @@ -89,7 +85,7 @@ import static java.lang.annotation.ElementType.FIELD; * non-{@code void} return types are allowed to support use of the method in * other contexts (builder-style method chaining, for example). * - * <p>For example: + * <p>Examples: * * <pre> * public class Car { @@ -115,6 +111,17 @@ import static java.lang.annotation.ElementType.FIELD; * restrictions or lack of reflection support) might preclude injection * of non-public members. * + * <p>For a given type T and optional qualifier, an injector must be able to + * inject a user-specified class that: + * + * <ol type="a"> + * <li>is assignment compatible with T and</li> + * <li>has an injectable constructor.</li> + * </ol> + * + * <p>Beyond that, which values are injected depend upon the injector + * implementation and its configuration. + * * <h3>Qualifiers</h3> * * <p>A {@linkplain Qualifier qualifier} may annotate an injectable field |