mirror of
https://github.com/eclipse-aspectj/aspectj.git
synced 2024-08-18 14:13:31 +02:00
23 lines
574 B
Java
23 lines
574 B
Java
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;
|
|
}
|