Package jfun.yan

Examples of jfun.yan.DelegatingComponent


      return result;
    }
  }
  //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);
        }
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);
        }
View Full Code Here

          final NutsContinuation cont = new NutsContinuation(exit, loc, id);
          frame = frame.put(exit, cont);
          final Object r = body.run(frame, runtime);
          if(r instanceof Component){
            final Component c = (Component)r;
            return new DelegatingComponent(c){
              public Object create(Dependency dep){
                try{
                  return super.create(dep);
                }
                catch(RuntimeException e){
View Full Code Here

TOP

Related Classes of jfun.yan.DelegatingComponent

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.