Unfortunately, I've noticed that the constructor in the implementation class must always be at least as visible as the aspect type. If the aspect is public, this class will also have to be. The interface can be private, though.
On Mon, Aug 31, 2009 at 7:21 PM, Andrew Eisenberg <[email protected]>wrote: > 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 <[email protected]>: > > 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? > _______________________________________________ > aspectj-users mailing list > [email protected] > https://dev.eclipse.org/mailman/listinfo/aspectj-users >
_______________________________________________ aspectj-users mailing list [email protected] https://dev.eclipse.org/mailman/listinfo/aspectj-users
