org.jboss.cache.factories.annotations
Annotation Type ComponentName
- @Retention(value=RUNTIME)
@Target(value=PARAMETER)
public @interface ComponentName 
Used with the Inject annotation to specify the name of a component to inject.
 Note that you still need to annotate your method with Inject for this
 annotation to be of any use.  You can also combine injections of named and singleton components, see example below.
 
 Usage example:
 
 
       public class MyClass
       {
          private Map blahMap;
          private Map anotherMap;
          private List someList;
          private TransactionManager tm;
 
          & Inject
          public void setMyMap(&ComponentName("BlahMap") Map blahMap)
          {
             this.blahMap = blahMap;
          }
          & Inject
          public void injectMoreStuff(&ComponentName("AnotherMap") Map anotherMap, &ComponentName("SomeList") List someList, TransactionManager singletonTM)
          {
             this.anotherMap = anotherMap;
             this.someList = someList;
             this.tm = singletonTM;
          }
       }
 
 
- Since:
- 2.1.0
- Author:
- Manik Surtani (manik@jboss.org)
- See Also:
- Inject
 
value
public abstract String value
- 
 
- 
 
Copyright © 2008 JBoss, a division of Red Hat. All Rights Reserved.