Package jfun.yan.xml.nuts.optional

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

package jfun.yan.xml.nuts.optional;

import jfun.yan.Component;
import jfun.yan.xml.nuts.MethodNut;

/**
* The <aspectj> tag that declares an aspect.
* <p>
* This tag will automatically call the "aspectOf" method, and also registers the
* aspect to be eagerly instantiated.
* </p>
* @author Ben Yu
* Dec 16, 2005 3:36:17 PM
*/
public class AspectjNut extends MethodNut {
  public Component eval(){
    if(super.getName()==null){
      super.setName("aspectOf");
    }
   
    final Component result = super.eval();
    this.registerEagerInstantiation(result);
    return result;
  }
}
TOP

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

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.