refactor Obj as interface
add getObj() method returning Obj instance by restrictions