[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [aspectj-users] policy enforcement for parameterless constructor and certain field declaration
- From: Matthew Adams <matthew@xxxxxxxxxxxxxxx>
- Date: Wed, 25 May 2011 08:16:49 -0500
- Delivered-to: firstname.lastname@example.org
For the first one, you might try using "declare error" with a type
pattern that uses hasmember. Not sure what you mean by the second,
but declare error with hasmember might do the trick there, too.
On Sat, May 21, 2011 at 5:57 PM, Kristof Jozsa <kristof.jozsa@xxxxxxxxx> wrote:
> I'd like to ask for help with two policy enforcement rules:
> - enforce a class having no constructor with arguments (a default or a
> parameterless constructor is fine)
> - enforce an annotated field being of a certain type
> For the second one I currently enforce the get() of the field which is not
> too bad, but would be nicer to disallow the field declaration.. if possible.
> Can anyone show me an example doing these tricks?
> Thanks a lot,
> aspectj-users mailing list