Here is a sample of the data structure I am working with:
myPackage = "Structure::PackageA" // Qualified Name
PackageA
|
+-- InstanceSpecification_1 <-- First Level Child
| InstanceSpecification_1a
| InstanceSpecification_1b
| InstanceSpecification_1c
|
+-- InstanceSpecification_2 <-- First Level Child
| InstanceSpecification_2a
| InstanceSpecification_2b
|
+-- InstanceSpecification_3 <-- First Level Child
InstanceSpecification_3a
InstanceSpecification_3b
InstanceSpecification_3c
What I want to fetch are the 3 First-Level Children InstanceSpecifications in PackageA.
From the sample structure above I want
InstanceSpecification_1
InstanceSpecification_2
InstanceSpecification_3
I have tried Finder.byType, Finder.byScope, Finder.byQualifiedName etc
From what I can tell, NONE of these Finders will give me the First-Level children of a package.
Here is an example:
- Code: Select all
instanceCollection = Finder.byType().find(myPackage, ClassTypes.getClassType('InstanceSpecification'))
This Finder.byType will return *ALL* instance specifications as follows:
InstanceSpecification_1
InstanceSpecification_1a
InstanceSpecification_1b
InstanceSpecification_1c
InstanceSpecification_2
InstanceSpecification_2a
InstanceSpecification_2b
InstanceSpecification_2
InstanceSpecification_3a
InstanceSpecification_3b
InstanceSpecification_3c
Can someone please show me the best way to get Only the First-Level children of a package ?
Thank You !!