【问题标题】:How to declare a java.util.Set as entry parameter of {m:template}如何将 java.util.Set 声明为 {m:template} 的入口参数
【发布时间】:2021-06-08 04:28:33
【问题描述】:

我有一个 m2doc docx 模板,可以从我的 eclipseRCP 应用程序生成 Word 文档。

我想将 java.util.Set 对象声明为 {m:template} 的入口参数。

我的代码如下:

{m:template t_templateTest(req:request::Request, filters: Set)}

我收到此错误消息:

{m:template <--- missing classifier literalt_templateTest(req:request::Request, filters: Set)} <---Expression "filters" is invalid: missing classifier literal

我不知道如何为 Set 声明分类器。

感谢您的帮助

【问题讨论】:

    标签: m2doc


    【解决方案1】:

    AQL 仅支持 Sequence 和 OrderedSet,并非您可以在 OCL 中找到的所有集合类型。 OrderSet 的定义还需要定义其中包含什么类型的元素,例如:

    OrderedSet(String)
    

    您可以查看type syntax of the AQL documentation 了解更多详情。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2016-11-19
      • 2018-10-08
      • 1970-01-01
      • 1970-01-01
      • 2012-12-25
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多