[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [aspectj-users] Visibility of inter-type members with @DeclareMixin and @DeclareParents
- From: Matthew Adams <matthew@xxxxxxxxxxxxxxx>
- Date: Tue, 1 Sep 2009 09:19:52 -0700
- Delivered-to: email@example.com
On Tue, Sep 1, 2009 at 8:29 AM, Matthew Adams<matthew@xxxxxxxxxxxxxxx> wrote:
>> It is a bit of a leaky abstraction. It is worth making an
>> enhancement request for AspectJ.
> Ok, will do.
>> Is the problem only with content
>> assist, or are there other places that you see the introduced fields
>> and methods appearing? Andy will get back to you on it when he
> Really, that's it. The issues that I'm concerned about are:
> 1. Fear factor.
> Let's face it, introducing introduction to a dev team can be scary,
> and when a member of the team hits dot in the IDE and sees all kinds
> of incredibly long "ajc$..." fields & methods, they kind of freak out.
> If they only saw conventionally-named java methods when using the
> public interface of the class, it easy to achieve adoption.
> 2. Encapsulation.
> When introducing fields, they end up public in the class, which means
> that anyone could set them, bypassing the business logic governing the
> setting of their values. I think this is a rarer use case, because
> most people on a dev team tend to be cooperative and not malicious,
> but the fact remains that public fields on classes are very rare.
> Again, I'm primarily concerned with AspectJ's obfuscation of the
> **public** interface of the class. Once you can see the soft
> underbelly of a class (other classes in the same package, subclasses,
> etc), I say anything goes. You're under the hood at that point.