Classes and types Code generation and templates The creation of templates and specializations are supported in code generation. If both the template and its specialization are in the same package, they are generated into the same file. In the file, the template is generated before its specialization to ensure that the code runs as expected. A check is added to warn that the template and template specialization are in different packages. Note If a nested class or attribute is marked as a template parameter, it is not generated. Template limitations The following limitations apply for templates:
Љ If there is a template parameter named “T” in an operation/function, the user cannot assign a class named “T” to the owner of the operation/function. Љ If there are more than one operation/function with a template parameter of the same name under the same owner, renaming the created nested class renames all of the parameters with this name. Љ For templates in a Java project, these are additional limitations: – Wildcards are not supported. – Bounded wildcards are not supported. – Generic methods are not supported. 126 User Guide