blob: be8cab5f69d26a6c2bfb63d5b53e9589d64f903c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
package moody;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.DeclareParents;
@Aspect
public class AnnotationMoodIndicator {
public interface Moody {
Mood getMood();
void setMood(Mood mood);
}
public static class MoodyImpl implements Moody {
private Mood mood = Mood.HAPPY;
public Mood getMood() { return mood; }
public void setMood(Mood mood) { this.mood = mood; }
}
@DeclareParents(value="moody.AnnotationMoodImplementor",defaultImpl=MoodyImpl.class)
private Moody implementedInterface;
}
|