【问题标题】:More than one type in @Category annotation@Category 注释中的多个类型
【发布时间】:2012-05-23 15:42:48
【问题描述】:

GWT AutoBean page 说:

@Category 注释可以指定多个类别类型。

以下语法给出了令牌“,”的语法错误,/预期

@Category(FooCategory.class, BarCategory.class)
public interface FooBarFactory extends AutoBeanFactory { 
    ...
}

指定多个类别类的语法是什么?

【问题讨论】:

    标签: java gwt annotations autobean


    【解决方案1】:

    {}包装参数

    @Category({FooCategory.class, BarCategory.class})
    public interface FooBarFactory extends AutoBeanFactory { 
        ...
    }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2022-11-15
      • 1970-01-01
      • 2017-11-03
      • 2023-02-04
      • 2017-03-04
      • 2017-10-02
      相关资源
      最近更新 更多