Package jfun.yan

Examples of jfun.yan.Recovery


  public Creator bind(Class component_type, Object key, Class type) {
    final String lookup_key = (Misc.getTypeName(component_type)+'.'+key)
      .replace('.', '/').replace('$', '/');
    Object v = names.get(lookup_key);
    if(v==null){
      final Recovery rec = Monad.onException(ComponentResolutionException.class,
          Monad.fail("failed to lookup " + lookup_key));
      return Components.useProperty(component_type, key, type)
        .recover(rec);
    }
    else{
View Full Code Here


  private Creator performLookup(Class component_type, Object key, Class type){
    final String lookup_key = (Misc.getTypeName(component_type)+'.'+key)
    .replace('.', '/').replace('$', '/');
    Object v = the_map.get(lookup_key);
    if(v==null){
      final Recovery rec = Monad.onException(ComponentResolutionException.class,
          Monad.fail("failed to lookup " + lookup_key));
      return Components.useProperty(component_type, key, type)
        .recover(rec);
    }
    else{
View Full Code Here

TOP

Related Classes of jfun.yan.Recovery

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.