Refactor Extract Method Calls To Aspect

[CategoryRefactoring/RefactoringLanguage - an instance of AspectOrientedRefactoring]

See "A case in point: Extract method calls refactoring" heading at http://www.theserverside.com/articles/article.tss?l=AspectOrientedRefactoringPart1 for an example of extracting authority-checking code from the start of each of a set of methods into advice at an appropriate AspectOrientedProgramming point cut.

The point of the example is that since (practically) all the public methods of the class must perform an authority check before doing real work, it makes sense to extract the common permission checks to an aspect that covers the entry point to each of these methods, rather than expecting that the methods will all call a "perform authority check" before doing their own work.


CategoryRefactoring


EditText of this page (last edited March 20, 2006) or FindPage with title or text search