Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] Visibility of inter-type members with @DeclareMixin and @DeclareParents

If the interface used as the introduced parent is only accessible
inside the aspect (ie- it is private), then its methods should only be
accessible from within the aspect.  So, your strategy below should
work (however, I have not tried this out myself).

2009/8/31 João Gonçalves <jocolimonada@xxxxxxxxx>:
> Using the private keyword in the factory method (for @DeclareMixin) / field
> (for @DeclareParents)?
> That is:
>     @DeclareMixin("ClassName")
>     private static IFood create FoodImplementation() {
>         return new FoodImpl();
>     }
>
> and
>     @DeclareParents(value="ClassName",defaultImpl=FoodImpl.class)
>     private IFood food;
>
>
> Thanks. Also, in the above examples, the visibility will be private, even if
> the interface/implementation class is public, right?


Back to the top