added a basic support for polymorphism. Only support type info as class in a property.