Moved most of the content of the AnnotationTypeResolver into the AnnotationTypeFactory class.

Change-Id: I4086f008d95a736f881c3d66c92b021a327e46f7