Refactoring some shadow generator logic into common methods

Change-Id: I25fc3248be5148fb1c14944eb4ddeec5bd4125b2
2 files changed