Package jfun.yan.xml.nuts.optional

Source Code of jfun.yan.xml.nuts.optional.InjectorAspectNut

package jfun.yan.xml.nuts.optional;

import jfun.yan.Component;
import jfun.yan.Components;
import jfun.yan.etc.injection.Injection;
import jfun.yan.etc.injection.InjectionUtils;
import jfun.yan.xml.nuts.Prop;

/**
* This class declares an aspect and enables the setting of {@link Injection}
* to the property "injection".
* <p>
* @author Ben Yu
* Dec 16, 2005 3:37:44 PM
*/
public class InjectorAspectNut extends AspectjNut {
  public void setInjection(Component inj){
    final Prop prop = new Prop();
    prop.initGloballyDefined(this.isGloballyDefined());
    prop.initNutEnvironment(this.getNutEnvironment());
    prop.initSequenceNumber(0);
    prop.initTagLocation(this.getTagLocation());
    prop.initTagName("injection");
    prop.setKey("injection");       
    prop.setVal(InjectionUtils.toInjection(inj));
    super.addProp(prop);
  }
}
TOP

Related Classes of jfun.yan.xml.nuts.optional.InjectorAspectNut

TOP
Copyright © 2018 www.massapi.com. 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.