interface @Constraints

This annotation is used to mark a Composite or a MixinType with one or more Constraint class(es) to be placed on the Invocation Stack. The @Constraints are used to validate method parameters.

Description

The order of the Constraints in the Invocation Stack is determined by the order the @Constraints annotations found in the Composite and by left-to-right order within the @Constraints annotation. Composites are parsed breadth-first and left-to-right in the extends clause of the Composite.

Declaration

package org.qi4j.api.constraint;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
* This annotation is used by composites and mixins to
* declare what Constraints can be applied in the Composite.
* <p/>
* Constraints implement the {@see Constraint} interface
*/
@Retention( RetentionPolicy.RUNTIME )
@Target( { ElementType.TYPE } )
@Documented
public @interface Constraints
{
    Class<? extends Constraint<?, ?>>[] value();
}

Example

Example(s) goes here...

Qi4j and the Qi4j logo are trademarks of Richard Öberg, Niclas Hedhman and the members of the Qi4j Core Team. See Qi4j licensing for more information.
Powered by SiteVisionexternal link.