aspect Test{

//the following should fail because adviceexecution
//is not allowed in a non-meta aspect    
    
	after(): adviceexecution(){}
	
	after(): meta adviceexecution(){}

	after(): meta(2) adviceexecution(){}

	after(): meta(3) adviceexecution(){}

//those should pass    
    
	after(): execution(* Clazz.*(..)) {}

	after(): execution(* L0Aspect.*(..)) {}

	after(): execution(* L1Aspect.*(..)) {}

	after(): execution(* L2Aspect.*(..)) {}

	after(): execution(* L3Aspect.*(..)) {}
	
//those should fail because of a too high meta level
    
	after(): meta execution(* Clazz.*(..)) {}

	after(): meta execution(* L0Aspect.*(..)) {}

	after(): meta execution(* L1Aspect.*(..)) {}

	after(): meta execution(* L2Aspect.*(..)) {}

	after(): meta execution(* L3Aspect.*(..)) {}

//those should fail because of a too high meta level

	after(): meta(2) execution(* Clazz.*(..)) {}

	after(): meta(2) execution(* L0Aspect.*(..)) {}

	after(): meta(2) execution(* L1Aspect.*(..)) {}

	after(): meta(2) execution(* L2Aspect.*(..)) {}

	after(): meta(2) execution(* L3Aspect.*(..)) {}

//those should fail because of a too high meta level

	after(): meta(3) execution(* Clazz.*(..)) {}

	after(): meta(3) execution(* L0Aspect.*(..)) {}

	after(): meta(3) execution(* L1Aspect.*(..)) {}

	after(): meta(3) execution(* L2Aspect.*(..)) {}

	after(): meta(3) execution(* L3Aspect.*(..)) {}
}

meta aspect Test1{

//this should pass    
    
	after(): adviceexecution(){}
	
//those should fail because of a too high meta level

    after(): meta adviceexecution(){}

	after(): meta(2) adviceexecution(){}

	after(): meta(3) adviceexecution(){}
	
//those should pass
    
    after(): execution(* Clazz.*(..)) {}

	after(): execution(* L0Aspect.*(..)) {}

	after(): execution(* L1Aspect.*(..)) {}

	after(): execution(* L2Aspect.*(..)) {}

	after(): execution(* L3Aspect.*(..)) {}
	
//  those should pass

    after(): meta execution(* Clazz.*(..)) {}

	after(): meta execution(* L0Aspect.*(..)) {}

	after(): meta execution(* L1Aspect.*(..)) {}

	after(): meta execution(* L2Aspect.*(..)) {}

	after(): meta execution(* L3Aspect.*(..)) {}

//  those should fail because of a too high meta level

	after(): meta(2) execution(* Clazz.*(..)) {}

	after(): meta(2) execution(* L0Aspect.*(..)) {}

	after(): meta(2) execution(* L1Aspect.*(..)) {}

	after(): meta(2) execution(* L2Aspect.*(..)) {}

	after(): meta(2) execution(* L3Aspect.*(..)) {}

//  those should fail because of a too high meta level

	after(): meta(3) execution(* Clazz.*(..)) {}

	after(): meta(3) execution(* L0Aspect.*(..)) {}

	after(): meta(3) execution(* L1Aspect.*(..)) {}

	after(): meta(3) execution(* L2Aspect.*(..)) {}

	after(): meta(3) execution(* L3Aspect.*(..)) {}
}

meta(2) aspect Test2{

//those should pass    
    
	after(): adviceexecution(){}
	
	after(): meta adviceexecution(){}

//  those should fail because of a too high meta level

    after(): meta(2) adviceexecution(){}

	after(): meta(3) adviceexecution(){}
	
//  those should pass
    
    after(): execution(* Clazz.*(..)) {}

	after(): execution(* L0Aspect.*(..)) {}

	after(): execution(* L1Aspect.*(..)) {}

	after(): execution(* L2Aspect.*(..)) {}

	after(): execution(* L3Aspect.*(..)) {}
	
//  those should pass

	after(): meta execution(* Clazz.*(..)) {}

	after(): meta execution(* L0Aspect.*(..)) {}

	after(): meta execution(* L1Aspect.*(..)) {}

	after(): meta execution(* L2Aspect.*(..)) {}

	after(): meta execution(* L3Aspect.*(..)) {}

//  those should pass

	after(): meta(2) execution(* Clazz.*(..)) {}

	after(): meta(2) execution(* L0Aspect.*(..)) {}

	after(): meta(2) execution(* L1Aspect.*(..)) {}

	after(): meta(2) execution(* L2Aspect.*(..)) {}

	after(): meta(2) execution(* L3Aspect.*(..)) {}

//  those should fail because of a too high meta level

	after(): meta(3) execution(* Clazz.*(..)) {}

	after(): meta(3) execution(* L0Aspect.*(..)) {}

	after(): meta(3) execution(* L1Aspect.*(..)) {}

	after(): meta(3) execution(* L2Aspect.*(..)) {}

	after(): meta(3) execution(* L3Aspect.*(..)) {}
}


meta(3) aspect Test3{

//  those should pass
    
    after(): adviceexecution(){}
	
	after(): meta adviceexecution(){}

	after(): meta(2) adviceexecution(){}

//  this should fail because of a too high meta level
    
	after(): meta(3) adviceexecution(){}
	
//  those should pass

    after(): execution(* Clazz.*(..)) {}

	after(): execution(* L0Aspect.*(..)) {}

	after(): execution(* L1Aspect.*(..)) {}

	after(): execution(* L2Aspect.*(..)) {}

	after(): execution(* L3Aspect.*(..)) {}
	
//  those should pass

	after(): meta execution(* Clazz.*(..)) {}

	after(): meta execution(* L0Aspect.*(..)) {}

	after(): meta execution(* L1Aspect.*(..)) {}

	after(): meta execution(* L2Aspect.*(..)) {}

	after(): meta execution(* L3Aspect.*(..)) {}

//  those should pass

	after(): meta(2) execution(* Clazz.*(..)) {}

	after(): meta(2) execution(* L0Aspect.*(..)) {}

	after(): meta(2) execution(* L1Aspect.*(..)) {}

	after(): meta(2) execution(* L2Aspect.*(..)) {}

	after(): meta(2) execution(* L3Aspect.*(..)) {}

//  those should pass

	after(): meta(3) execution(* Clazz.*(..)) {}

	after(): meta(3) execution(* L0Aspect.*(..)) {}

	after(): meta(3) execution(* L1Aspect.*(..)) {}

	after(): meta(3) execution(* L2Aspect.*(..)) {}

	after(): meta(3) execution(* L3Aspect.*(..)) {}
    
//  this should pass, just provides a named pointcut, which is valid (here!)

    pointcut named(): meta(2) execution(* L3Aspect.*(..));
}

aspect InlineTest {
    
//this should fail because the named pointcut contains a meta pointcut    
    
    after(): Test3.named(){}
    
}

meta(3) aspect TestX {

//this should pass (but will never match)    
    
    after(): meta adviceexecution() && execution(* L3Aspect.*(..)) {}

}

