the normal way is to put this code in your package and import the Constructor type from the snakeyaml