Factor out annotation literal instance creation

Change-Id: I74b6c3627ccad470c236af75f9e42560f5335ed7