/*
 * JBoss, the OpenSource EJB server
 *
 * Distributable under LGPL license.
 * See terms of license at gnu.org.
 */

import org.jboss.aop.DeclareWarning;
import org.jboss.aop.DeclareError;
import org.jboss.aop.Aspect;
import org.jboss.aop.pointcut.Pointcut;

/**
 * @author <a href="mailto:kabir.khan@jboss.org">Kabir Khan</a>
 * @version $Revision: 1.2.10.2 $
 */
@Aspect
public class DeclareAspect
{
   @DeclareWarning (expr="class($instanceof{VehicleDAO}) AND !has(public void *->save())", msg="All VehicleDAO subclasses must override the save() method.")
   public static Pointcut warning1;

   @DeclareWarning (expr="call(Driver->new(..)) AND within(*DAO)", msg="DAO classes should not access the Driver class")
   public static Pointcut warning2;

   @DeclareWarning (expr="call(* Driver->*(..)) AND withincode(* *DAO->save())", msg="DAO classes should not access the Driver class")
   public static Pointcut warning3;

}
