Added getLifecycleName method 

The getLifecycleName returns the name of the currently attached life-cycle.