Accessing a Meta-Data Class in an Imported Package

You can explicitly reference a class object in an imported package by qualifying the type name (that is, a class or interface) with its package name, using the following syntax.

imported-package-name::type-name

The :: meta-object scope operator specifies the explicitly qualified name of the metaschema object, as shown in the following example.

vars
    cust : CustomerPkg::Customer;
begin
    cust := CustomerPkg::Customer.firstInstance;
    ...                            // Do some processing here
end;

When an imported type can unambiguously be identified, you do not have to prefix the type name with the imported package alias. When an imported type name does conflict with a local or inherited type, the unqualified name always refers to the local or inherited type. To access the imported class in such cases, prefix the imported class name with the imported package name. For details about packages, see Chapter 8, "Using Packages".