summaryrefslogtreecommitdiffstats
path: root/tests/java5/reflection/Billing.aj
blob: 0c9923ea456fccf12dbb62fe816ea616afb60e38 (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
28
29
public aspect Billing {

	public Customer Connection.payer;
    
	/**
     * Connections give the appropriate call rate
     */
    public abstract long Connection.callRate();

    public long LongDistance.callRate() { return 1; }
    public long Local.callRate() { return 2; }

    /**
     * Customers have a bill paying aspect with state
     */
    public long Customer.totalCharge = 0;

    public void Customer.addCharge(long charge){
        totalCharge += charge;
    }
}

class Customer {}

abstract class Connection {}

class LongDistance extends Connection {}

class Local extends Connection {}