Author: limpbizkit
Date: Mon Mar  2 21:08:43 2009
New Revision: 896

Modified:
    wiki/BindingAnnotations.wiki

Log:
Edited wiki page through web user interface.

Modified: wiki/BindingAnnotations.wiki
==============================================================================
--- wiki/BindingAnnotations.wiki        (original)
+++ wiki/BindingAnnotations.wiki        Mon Mar  2 21:08:43 2009
@@ -1,5 +1,5 @@
  =Binding Annotations=
-Occasionally you'll want multiple bindings for a same type. For example,  
you might want both a PayPal credit card processor and a Google Checkout  
processor. To enable this, bindings support an optional *binding  
annotation*. The annotation and type together uniquely identify a binding.  
This pair is called a *key*.
+Occasionally you'll want multiple bindings for a same type. For example,  
you might want both a !PayPal credit card processor and a Google Checkout  
processor. To enable this, bindings support an optional *binding  
annotation*. The annotation and type together uniquely identify a binding.  
This pair is called a *key*.

  Defining a binding annotation requires two lines of code plus several  
imports. Put this in its own `.java` file or inside the type that it  
annotates.
  {{{
@@ -62,4 +62,4 @@
  ==Binding Annotations with Attributes==
  Guice supports binding annotations that have attribute values. In the rare  
case that you need such an annotation:
    # Create the annotation `...@interface`.
-  # Create a class that implements the annotation interface. Follow the  
guidelines for `equals()` and `hashCode()` specified in the  
[http://java.sun.com/javase/6/docs/api/java/lang/annotation/Annotation.html  
Annotation Javadoc]. Pass an instance of this to the `annotatedWith()`  
binding clause.
+  # Create a class that implements the annotation interface. Follow the  
guidelines for `equals()` and `hashCode()` specified in the  
[http://java.sun.com/javase/6/docs/api/java/lang/annotation/Annotation.html  
Annotation Javadoc]. Pass an instance of this to the `annotatedWith()`  
binding clause.
\ 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