Refactor the interface. And added validateByAnnotation method.