You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by hl...@apache.org on 2011/07/13 02:03:02 UTC

svn commit: r1145827 - /tapestry/tapestry5/trunk/tapestry5-annotations/src/main/java/org/apache/tapestry5/ioc/annotations/Symbol.java

Author: hlship
Date: Wed Jul 13 00:03:02 2011
New Revision: 1145827

URL: http://svn.apache.org/viewvc?rev=1145827&view=rev
Log:
Add a reference to @IntermediateType from @Symbol

Modified:
    tapestry/tapestry5/trunk/tapestry5-annotations/src/main/java/org/apache/tapestry5/ioc/annotations/Symbol.java

Modified: tapestry/tapestry5/trunk/tapestry5-annotations/src/main/java/org/apache/tapestry5/ioc/annotations/Symbol.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry5-annotations/src/main/java/org/apache/tapestry5/ioc/annotations/Symbol.java?rev=1145827&r1=1145826&r2=1145827&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry5-annotations/src/main/java/org/apache/tapestry5/ioc/annotations/Symbol.java (original)
+++ tapestry/tapestry5/trunk/tapestry5-annotations/src/main/java/org/apache/tapestry5/ioc/annotations/Symbol.java Wed Jul 13 00:03:02 2011
@@ -1,4 +1,4 @@
-// Copyright 2007, 2008, 2009 The Apache Software Foundation
+// Copyright 2007, 2008, 2009, 2011 The Apache Software Foundation
 //
 // Licensed under the Apache License, Version 2.0 (the "License");
 // you may not use this file except in compliance with the License.
@@ -15,24 +15,29 @@
 package org.apache.tapestry5.ioc.annotations;
 
 import java.lang.annotation.Documented;
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.PARAMETER;
 import java.lang.annotation.Retention;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
 import java.lang.annotation.Target;
 
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
 import static org.apache.tapestry5.ioc.annotations.AnnotationUseContext.*;
 
 /**
  * Used to inject a symbol value, via a symbol name. This is used much like {@link
  * org.apache.tapestry5.ioc.annotations.Value} annotation, except that symbols are not expanded ... the entire value is
  * a symbol name. This allows the annotation to reference a public constant variable.
+ * <p/>
+ * <p/>
+ * The injected value may be coerced from string to an alternate type (defined by the field or parameter to which
+ * the @Symbol annotation is attached). For better control, use the {@link IntermediateType} annotation as well, which
+ * allows the string to be coerced to an alternate type before being coerced a second time to the field or parameter type.
  */
 @Target(
-        { PARAMETER, FIELD })
+        {PARAMETER, FIELD})
 @Retention(RUNTIME)
 @Documented
-@UseWith({COMPONENT,MIXIN,PAGE,SERVICE})
+@UseWith({COMPONENT, MIXIN, PAGE, SERVICE})
 public @interface Symbol
 {
     /**