Adding factory method for annotation processor.