Package jfun.yan

Examples of jfun.yan.Mutation


    final Component r = super.eval();
    if(echo){
      final String msg = (String)this.getNutEnvironment().findService("echo_msg");
      if(msg == null)
        throw raise("echo_msg not found.");
      return r.mutate(new Mutation(){
        public void mutate(Object r){
          System.out.println(msg + r +" constructed.");
        }
      });
    }
View Full Code Here


import jfun.yan.Mutation;

final class Util {
  static Component decorate(boolean echo, Component c, final Listener l){
    if(!echo) return c;
    return c.mutate(new Mutation(){
      public void mutate(Object obj){
        l.onInstance(obj);
      }
    });
  }
View Full Code Here

      return c;
    }
    final Class param_type = param_types[0];
    if(ReflectionUtil.isInstance(param_type, val)){
      final Object[] args = {val};
      return c.mutate(new Mutation(){
        public void mutate(Object obj)
        throws Exception{
          mtd.invoke(obj, args);
        }
      });
View Full Code Here

    if(argtype!=null && !ReflectionUtil.isAssignableFrom(param_type, argtype)){
      return c;
    }
    return c.followedBy(new Binder(){
      public Creator bind(final Object obj){
        return valc.mutate(new Mutation(){
          public void mutate(Object arg) throws Exception {
            if(ReflectionUtil.isInstance(param_type, arg)){
              mtd.invoke(obj, new Object[]{arg});
            }
          }
View Full Code Here

        return injectFactoryBeanResult(ctxt, obj);
      }
    };
  }
  private static Mutation getBeanMutation(final SpringContext ctxt){
    return new Mutation(){
      public void mutate(Object obj)
      throws Exception{
        injectBasicBean(obj, ctxt);
      }
    };
View Full Code Here

TOP

Related Classes of jfun.yan.Mutation

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.