Package jfun.yan

Examples of jfun.yan.Component


  public ApplicationContext getApplicationContext() {
    return spring.getApplicationContext();
  }

  public Component eval(){
    final Component r = super.eval();
    return SpringAdapter.adapt(r, this, tx, transaction_attrs, interfaces);
  }
View Full Code Here


  public Component eval(){
    if(super.getName()==null){
      super.setName("aspectOf");
    }
   
    final Component result = super.eval();
    this.registerEagerInstantiation(result);
    return result;
  }
View Full Code Here

    if(ind<0){
      raise("invalid subscript: "+ind);
    }
  }
  public Component eval(){
    final Component cc = getComponent();
    checkMandatory("component", cc);
    checkIndex(ind);
    final Class type = cc.getType();
    if(type!=null && !type.isArray() &&
        !jfun.yan.util.Utils.isCompatible(List.class, cc)
    ){
      throw raise("cannot apply subscript against " +
          Misc.getTypeName(type));
View Full Code Here

  public ApplicationContext getApplicationContext() {
    return spring.getApplicationContext();
  }

  public Component eval(){
    final Component r = super.eval();
    return SpringAdapter.adapt(r, this, tx, transaction_attrs, interfaces);
  }
View Full Code Here

  public ApplicationContext getApplicationContext() {
    return spring.getApplicationContext();
  }

  public Component eval(){
    final Component r = super.eval();
    return SpringAdapter.adapt(r, this, tx, transaction_attrs, interfaces);
  }
View Full Code Here

          if(args!=null && ind < args.length){
            return toComponent(type, args[ind]);
          }
          final Arg a = (Arg)indmap.get(new Integer(ind));
          if(a!=null){
            Component val = a.getVal(type);
            if(val == null){
              val = Components.value(null);//Components.useArgument(src, ind, type);
            }
            final Component def = a.getDefault(type);
            if(def!=null){
              return Monad.mplus(val, def);
            }
            else return val;
          }
View Full Code Here

    if(!prop_elements.isEmpty()){
      component = component.bindProperties(new PropertyBinder(){
        public Creator bind(Class component_type, Object key, Class type) {
          final Prop prop = (Prop)valnames.get(key);
          if(prop!=null){
            Component result = prop.getVal(type);
            if(result==null){
              result = Components.value(null);//Components.useProperty(component_type, key, type);
            }
            final Component def = prop.getDefault(type);
            if(def!=null){
              result = Monad.mplus(result, def);
            }
            else if(prop.isOptional()){
              result = result.optional();
View Full Code Here

  public void setProps(Component props) {
    this.props = props;
  }

  public Component eval(){
    final Component p = getProps();
    final Component cc = getMandatory();
    Component result = p.bind(new Binder(){
      public Creator bind(Object v) throws Throwable {
        if(v==null) return cc;
        if(v instanceof java.util.Map){
          final java.util.Map m = (java.util.Map)v;
          final int sz = m.size();
View Full Code Here

  public void setArgs(Component args) {
    this.args = args;
  }

  public Component eval(){
    final Component a = getArgs();
    final Component cc = getMandatory();
   
    Component result = a.bind(new Binder(){
      public Creator bind(Object v) throws Throwable {
        if(v==null) return cc;
        if(v.getClass().isArray()){
          final int sz = Array.getLength(v);
          final Component[] cargs = new Component[sz];
View Full Code Here

    this.reentrant_set = true;
  }

  public Component eval(){
    checkMandatory("name", name);
    final Component target = getMandatory();
    final String phase = name.toLowerCase(Locale.US)
      .trim();
    if(DefaultLifecycleDescriptor
        .DEFAULT_INITIALIZER_NAME.equals(phase)){
      //initializer runs right away.
      return target;
    }
    else{
      //The object identity of the factory determines if this factory
      //can be called multiple times by the lifecycle manager.
      //so cannot use singleton even if it carries no state.
      final Component factory =
        target.factory();
      final LifecycleManager man = super.getNutEnvironment()
      .getLifecycleManager();
      final Lifecycle lifecycle = new Lifecycle();
      lifecycle.put(phase, FactoryProcedure.instance(), isReentrant(phase));
View Full Code Here

TOP

Related Classes of jfun.yan.Component

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.