Locate all the nested properties of a certain class
조회 수: 1 (최근 30일)
이전 댓글 표시
I have a "huge" object with lots of nested properties, and I would like to locate all the instances of a certain class within the properties.
For example, in pseudocode, I am looking for something like the function findClassWithinObject below:
hugeobject = HugeObject()
targetclass = 'TargetClass'
findClassWithinObject(hugeobject, targetclass)
% Returns: {hugeobject.level1property1.level1property2, hugeobject.level1property100}
% Which are properties whose class is TargetClass
If returning "all" the properties is too much, finding a single instance of the TargetClass would already help me navigate the codebase.
Thanks
댓글 수: 0
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Software Development Tools에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!