aboutsummaryrefslogtreecommitdiffstats
path: root/org.aspectj.ajdt.core/testdata/src1/binary/lib/AbstractA.aj
blob: c9526d7a6c3a000aa7f7eb004fb0c90fe69b557d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
package lib;

public abstract aspect AbstractA {
    public interface Marker {}
    
    public String Marker.value = "public";
    private String Marker.pValue = "private";
    
    public static String getPrivateValue(Marker m) { return m.pValue; }

	protected abstract pointcut scope();

    declare error: scope() && within(Marker+) && call(* java.io.PrintStream.println(*)):
        "use a proper logger";
    
    before(Marker m): this(m) && execution(new(..)) {
        System.err.println("making a Marker: " + m + " with " + m.pValue);
    }
    
    declare parents: *..*MarkMe implements Marker;
}

aspect SubAbstractA extends AbstractA {
	// amc - make a concrete sub-aspect so that the declare parents in the super aspect can
	// take effect!
	protected pointcut scope();
}