summaryrefslogtreecommitdiffstats
path: root/tests/bugs152/pr147701/TestBean2.java
blob: 229de4abf079d9939f48f56288a0550ff484eecf (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
package a.b.c;

import org.aspectj.lang.annotation.*;

interface I { public void m() throws BeansException; }

class Impl implements I {
  public Impl() {}
  public void m() throws BeansException { }
}

@Aspect
class TestBeanAdvice {
  @DeclareParents(value="a.b.c.TestBean2", defaultImpl=a.b.c.Impl.class)
  private I implementationInterface;
}

public class TestBean2 {
  public static void main(String []argv) throws Exception {
    ((I)new TestBean2()).m();
  }
}

class BeansException extends Exception {}