First off, Santosh, this is probably better asked on the user list (
aspectj-users@xxxxxxxxxxx). No big, though.
You can't really arbitrarily add a single line of code to a method, to my knowledge, via aspectj. You can, however, cause code to be executed before and/or after a method. Your intent will dictate which kind of advice you need. I recommend using the least powerful form of advice that satisfies your need.
You have three choices of advice: before, after & around. After advice comes in three flavors, corresponding to try/catch/finally: after returning, after throwing, and after (meaning "after finally").
Before advice executes, naturally before the joinpoint picked out by your pointcut executes. You can only prevent execution of the joinpoint by having your before advice throw an exception.
Around advice, the most powerful, executes before the joinpoint, and allows you to determine whether the joinpoint is allowed to execute. If it should, simply call the aspectj builtin method proceed() (which has arguments that match that of your advice). Remember to capture the return value from the joinpoint so that you can either return it, change it, or ignore it, returning something else.
After returning advice only executes after the normal return of the joinpoint. If the joinpoint throws, after returning advice will not execute.
After throwing advice only executes after the joinpoint throws an exception. If the joinpoint returns normally, after throwing advice will not execute.
Plain after advice means "after finally", and executes whether or not the joinpoint threw an exception.
In your case, you could effectively "add a line of code" via before advice, any type of after advice. Using around advice would allow you to "add a line of code" both before and after the method, if that's what you intended.
HTH,
Matthew