More than one type in @Category annotation

500 views Asked by At

The GWT AutoBean page says:

The @Category annotation may specify more than one category type.

The following syntax gives Syntax error on token ",", / expected :

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

What is the syntax for specifying multiple category classes?

1

There are 1 answers

0
Danny Kirchmeier On BEST ANSWER

Wrap the parameters with { and }

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