aboutsummaryrefslogtreecommitdiffstats
path: root/tests/bugs1611/pr335783/X.aj
blob: c14cd2bacc65c25a856746ce79f6787c845f9711 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/*******************************************************************************
 * Copyright (c) 2010 Contributors All rights reserved. This program and the
 * accompanying materials are made available under the terms of the Eclipse
 * Public License v1.0 which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 * 
 * Contributors: Abraham Nevado
 *******************************************************************************/

aspect X {

	public pointcut doSomething(Object o): 
    	execution(* *()) && target(o);

	before(Object o) : doSomething(o) {
		try {
			String signature = thisJoinPointStaticPart.getSignature().toString();
			System.out.println("OK");
		} catch (NullPointerException npe) {
			System.out.println("KO");
		}
	}
}