org.carrot2.util.attribute.constraint
Annotation Type ImplementingClasses


@Target(value=FIELD)
@Retention(value=RUNTIME)
public @interface ImplementingClasses

Requires that instances bound to the attribute are of one of the provided classes().


Required Element Summary
 Class<?>[] classes
          The allowed classes for the attribute value.
 
Optional Element Summary
 boolean strict
          If true, only instances assignable to one of the listed classes() will be allowed.
 

Element Detail

classes

public abstract Class<?>[] classes
The allowed classes for the attribute value.

strict

public abstract boolean strict
If true, only instances assignable to one of the listed classes() will be allowed. Otherwise, any instance assignable to the attribute type will be allowed.

Default:
true


Copyright (c) Dawid Weiss, Stanislaw Osinski