com.twitter.common.args
Interface Verifier<T>

All Known Implementing Classes:
CanExecuteFileVerifier, CanReadFileVerifier, CanWriteFileVerifier, ExistsFileVerifier, IsDirectoryFileVerifier, NotEmptyIterableVerifier, NotEmptyStringVerifier, NotNegativeNumberVerifier, NotNullVerifier, PositiveNumberVerifier, RangeNumberVerifier, ScalarVerifier

public interface Verifier<T>

Typedef for a constraint verifier.


Method Summary
 String toString(Class<T> argType, Annotation annotation)
          Returns a representation of the constraint this verifier checks.
 void verify(T value, Annotation annotation)
          Verifies the value against the annotation.
 

Method Detail

verify

void verify(T value,
            Annotation annotation)
Verifies the value against the annotation.

Parameters:
value - Value that is being applied.
annotation - Annotation that the verifier is checking against.

toString

String toString(Class<T> argType,
                Annotation annotation)
Returns a representation of the constraint this verifier checks.

Parameters:
argType - The type of the Arg this annotation applies to.
annotation - The constraint annotation to represent.
Returns:
A representation of the constraint this verifier checks.