nAspects can be used as an alternative to existing technologies such as EJB. Ex: declarative transaction management, declarative security, profiling, logging,
etc.
nAspects can be added or removed as needed without changing your code.
nTarget
- An
object whose execution flow is modified by some
AOP process. They are sometimes called advised object
nAdvice
example
npackage swe645.ioc;
nimport java.lang.reflect.Method;
nimport org.springframework.aop.*;
npublic class MyAdvice implements MethodBeforeAdvice{
n public void before(Method m, Object[] args, Object target) {
n System.out.println("Before
Advice");
n }
n}