Initializer
init(object:shouldIgnoreUnresolvedClassifiers:)
Initialise an EPackage from a DynamicEObject (without resource context).
init(object: any EObject, shouldIgnoreUnresolvedClassifiers: Bool = false) throws
Parameters
object-
The DynamicEObject representing an EPackage.
shouldIgnoreUnresolvedClassifiers-
If
true, continues processing when classifier resolution fails; iffalse, throws on resolution failure (default:false).
Return Value
A new EPackage instance.
Discussion
This initialiser handles cases where cross-references are already resolved or when the object contains direct references instead of UUIDs. When classifiers cannot be resolved, behaviour depends on the shouldIgnoreUnresolvedClassifiers parameter.
Example
let dynamicPackage: DynamicEObject = // ... from XMI parsing
let package = try EPackage(object: dynamicPackage)