Annotation based object factory