Create a custom subclass of the collection class (%ListOfDataTypesOpens in a new tab, %ArrayOfDataTypesOpens in a new tab, %ListOfObjectsOpens in a new tab, %ArrayOfObjectsOpens in a new tab). In the subclass, specify the ELEMENTTYPE class parameter. For example:
Class MyApp.MyIntegerCollection Extends %ListOfDataTypes
{
Parameter ELEMENTTYPE="%Library.Integer";
}
For ELEMENTTYPE, specify the complete package and class name of the class used in the collection. If you subclass %ListOfDataTypesOpens in a new tab or %ArrayOfDataTypesOpens in a new tab, specify a data type class. Then the type for the collection element is controlled by the XSDTYPE parameter for that class.
If you subclass %ListOfObjectsOpens in a new tab or %ArrayOfObjectsOpens in a new tab, specify an XML-enabled class. For example
Class MyApp.MyObjectCollection Extends %ListOfObjects
{
Parameter ELEMENTTYPE="MyApp.SimpleObject";
}
Then use your custom collection class in your property definition. For example:
Property MyProp as MyApp.MyIntegerCollection;