Replace ::class property with string representation