Hi Krishna,
Your requirement is not clear though, I think you need the component name while a method is being executed. Do one thing. Put a break point in your method and while debugging type 'me' and see the component name there. The easy way it's.
Thanks,
Faisal