[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] warning on wrong constructor

Yes, declare warning is compile time only.  You could advise this at
runtime and throw an exception if it doesn't conform to you

On Fri, Nov 14, 2008 at 8:58 AM, Luca Ferrari <fluca1978@xxxxxxxxxxx> wrote:
> Hi,
> I don't know if it is possible, but I'd like to declare a warning for a
> constructor calls of objects SerializableObject+ when the constructors do not
> initialize all the Collection+ declared within the same class. My thought is
> to write a pointcut that exports the context of the object being constructed,
> so that with reflection I can see the declared collections and get their
> values (that should not be null). The problem is that declare warning works
> not at run-time, right? So I cannot get a context or execute reflection on the
> object. Is there a way to achieve this?
> Thanks,
> Luca
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/aspectj-users