Hi Pengcheng: an alternative way to check the Law of Demeter would be to write a generator that generates a lot of declare statements that will be processed by AspectJ: declare : error SomePointCut "LoD violation" where SomePointCut is of the form: in method A.f you call a method that is not permitted by LoD Would it be easy to generate all those declare statements to check the static form of LoD using AspectJ? -- Karl