Package jfun.yan

Examples of jfun.yan.ComponentMap


  }
  //useKey used in auto-wiring expects no property and argument, so optimize.
  private static Component useKey(final Object key){
    return new DelegatingComponent(Components.useKey(key)){
      public Object create(Dependency dep){
        final ComponentMap cmap = dep.getComponentMap();
        if(cmap instanceof Container){
          return ((Container)cmap).getInstance(key);
        }
        else return super.create(dep);
      }
View Full Code Here


  }
  //useKey used in auto-wiring expects no property and argument, so optimize.
  private static Component useType(final Class type){
    return new DelegatingComponent(Components.useType(type)){
      public Object create(Dependency dep){
        final ComponentMap cmap = dep.getComponentMap();
        if(cmap instanceof Container){
          return ((Container)cmap).getInstanceOfType(type);
        }
        else return super.create(dep);
      }
View Full Code Here

TOP

Related Classes of jfun.yan.ComponentMap

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.