Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] declare parents semantics clarification with annotations on interface mixin

Hi,

 

I’m a little confused about the declare parents declaration and how annotations play in. What happens when an interface is mixed in and a method in the interface is annotated using the @AspectJ annotation style?

 

For example:

 

  …

  @DeclareParents(value = "my.*", defaultImpl = MixMeImpl.class)

  public MixMe implementsMixMe;

  …

 

public interface MixMe {

  @InQuestion

  void doit();

}

 

public class MixMeImpl implements MixMe {

  @FromImpl

  public void doit();

}

 

What happens to the annotation @InQuestion? Do classes inherit the @InQuestion annotation or the @FromImpl annotation? Do the semantics match the following aspectj language syntax?

 

declare parents : (my.*) implements MixMe ;

declare parents : (my.*) extends MixMeImpl ;

 

Regards,

Larry

 


Back to the top