This chapter covers
Understanding AOP policy enforcement patterns
Enforcing EJB programming restrictions using AspectJ
Enforcing Swing policies using AspectJ
Imagine that you're convinced public access to a data member of a class isn't a good idea. Or, imagine that you've realized layered architecture is the way to go. Or, suppose you've just finished reading the Enterprise JavaBeans (EJB) specification and realize that the specification prohibits working directly with files from an EJB. Clearly, you'd like to ensure that the projects you work on don't violate these principles and restrictions. What are your choices? You could send emails to your team asking them to check for these violations, ...