Top Description Fields Constructors Methods
javax.validation

public final Enum ConstraintTarget

extends Enum<ConstraintTarget>
Class Inheritance

Defines the constraint target.
Author
Emmanuel Bernard
Since
1.1

Field Summary

Modifier and TypeField and Description
public static final ConstraintTarget
IMPLICIT

Discover the type when no ambiguity is present

  • if neither on a method nor a constructor, it implies the annotated element (type, field etc),
  • if on a method or constructor with no parameter, it implies RETURN_VALUE,
  • if on a method with no return value (void), it implies PARAMETERS.
public static final ConstraintTarget
PARAMETERS

Constraint applies to the parameters of a method or a constructor

public static final ConstraintTarget
RETURN_VALUE

Constraint applies to the return value of a method or a constructor.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static ConstraintTarget
public static ConstraintTarget[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

IMPLICITback to summary
public static final ConstraintTarget IMPLICIT

Discover the type when no ambiguity is present

  • if neither on a method nor a constructor, it implies the annotated element (type, field etc),
  • if on a method or constructor with no parameter, it implies RETURN_VALUE,
  • if on a method with no return value (void), it implies PARAMETERS.
Otherwise, IMPLICIT is not accepted and either RETURN_VALUE or PARAMETERS is required. This is the case for constructors with parameters and methods with parameters and return value.
PARAMETERSback to summary
public static final ConstraintTarget PARAMETERS

Constraint applies to the parameters of a method or a constructor

RETURN_VALUEback to summary
public static final ConstraintTarget RETURN_VALUE

Constraint applies to the return value of a method or a constructor.

Constructor Detail

ConstraintTargetback to summary
private ConstraintTarget()

Method Detail

valueOfback to summary
public static ConstraintTarget valueOf(String name)
valuesback to summary
public static ConstraintTarget[] values()