Author: limpbizkit
Date: Sun Nov 16 18:14:20 2008
New Revision: 688

Added:
    wiki/BindingResolution.wiki

Log:
Created wiki page through web user interface.

Added: wiki/BindingResolution.wiki
==============================================================================
--- (empty file)
+++ wiki/BindingResolution.wiki Sun Nov 16 18:14:20 2008
@@ -0,0 +1,21 @@
+#summary How the Injector resolves injection requests
+=Binding Resolution=
+The injector's process of resolving an injection request depends on the  
bindings and the annotations of the types involved.  Here's how an  
injection request is resolved:
+  # *Use explicit bindings.*
+    * If the binding links to another, follow this resolution algorithm  
for that.
+    * If the binding specifies an instance, return that.
+    * If the binding specifies a provider, use that.
+  # *Ask a parent injector.* If this injector has a parent injector, ask  
that to resolve the binding. If it succeeds, use that. Otherwise proceed.
+  # *Ask child injectors.* If any child injector already has this binding,  
give up. A blacklist of bindings from child injectors is kept so injectors  
don't need to maintain references to their child injectors.
+  # *Handle Provider injections.* If the type is `Provider<T>`, resolve  
`T` instead, using the same binding annotation, if it exists.
+  # *Convert constants.* If there is a constant string bound with the same  
annotation, and a `TypeConverter` that supports this type, use the  
converted String.
+  # *If the dependency has a binding annotation, give up.* Guice will not  
create default bindings for annotated dependencies.
+  # *If the dependency is an array or enum, give up.*
+  # *Handle !TypeLiteral injections*. If the type is `TypeLiteral<T>`,  
inject that value, using context for the value of the type parameter.
+  # *Use resolution annotations.* If the dependency's type has  
[EMAIL PROTECTED] or [EMAIL PROTECTED], lookup the binding for the referenced  
type and use that.
+  # *If the dependency is abstract or a non-static inner class, give up.*
+  # *Use a single [EMAIL PROTECTED] or public no-arguments constructor.*
+    # Validate bindings for all dependencies — the constructor's  
parameters, plus [EMAIL PROTECTED] methods and fields of the type and all  
supertypes.
+    # Invoke the constructor.
+    # Inject all fields. Supertype fields are injected before subtype  
fields.
+    # Inject all methods. Supertype methods are injected before subtype  
methods.
\ No newline at end of file

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"google-guice-dev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-guice-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to