Justin M. Keyes
Justin M. Keyes

Reputation: 6964

More than one type in @Category annotation

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?

Upvotes: 1

Views: 503

Answers (1)

Danny Kirchmeier
Danny Kirchmeier

Reputation: 1134

Wrap the parameters with { and }

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

Upvotes: 2

Related Questions