add a class to generate object by type and values.