added generic UndefinedClassException
added generic factory ClassWithOptionsGenericFactory
createInstance() made protected