I'm relatively new to the java API for MagicDraw, and tagging questions correctly related to MagicDraw, so I apologize if I don't have the right tags. I'm currently using MagicDraw 2021x, and trying to figure out how to get the contents of a smart package assuming I have a reference to the smart package which I've assigned to a variable of type Package. I tried using the getPackagedElement() but that doesn't seem to work on Smart Packages the same way it works on normal packages and returns nothing.
Maybe I'm just having trouble finding it, but I don't see a a subinterface related to Smart Packages when looking under the Package interface. Any help would be appreciated. Not sure if it makes a difference, but specifically the smart package contains a bunch of InformationFlow elements.
Under the CoreHelper interface (com.nomagic.uml2.ext.jmi.helpers.CoreHelper), there is a getOwnedElementsIncludingAdditional() that can be used to get contents of a smart package.