Copyright 2008 - 2009 Tony Morris, Runar Bjarnason, Tom Adams, Brad Clow, Ricky Clarkson, Nick Partridge, Jason Zaugg

This software is released under an open source BSD licence.

fj.test.reflect
Class Check

java.lang.Object
  extended by fj.test.reflect.Check

public final class Check
extends Object

Functions for checking properties in a class that are found reflectively and according to various annotations.


Method Summary
static
<T> List<P2<String,CheckResult>>
check(Class<T> c, List<String> categories)
          Returns the results and names of checking the properties on the given class using a standard random generator.
static
<T> List<P2<String,CheckResult>>
check(Class<T> c, Rand r, List<String> categories)
          Returns the results and names of checking the properties on the given class.
static
<T> List<P2<String,CheckResult>>
check(Class<T> c, Rand r, String... categories)
          Returns the results and names of checking the properties on the given class.
static
<T> List<P2<String,CheckResult>>
check(Class<T> c, String... categories)
          Returns the results and names of checking the properties on the given class using a standard random generator.
static
<T> List<P2<String,CheckResult>>
check(List<Class<T>> c, List<String> categories)
          Returns the results and names of checking the properties on the given classes using a standard random generator.
static
<T> List<P2<String,CheckResult>>
check(List<Class<T>> c, Rand r, List<String> categories)
          Returns the results and names of checking the properties on the given classes.
static
<T> List<P2<String,CheckResult>>
check(List<Class<T>> c, Rand r, String... categories)
          Returns the results and names of checking the properties on the given classes.
static
<T> List<P2<String,CheckResult>>
check(List<Class<T>> c, String... categories)
          Returns the results and names of checking the properties on the given classes using a standard random generator.
static
<U,T extends U>
List<P3<Property,String,Option<CheckParams>>>
properties(Class<T> c, String... categories)
          Returns all properties, their name and possible check parameters in a given class that are found reflectively and according to various annotations.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

check

public static <T> List<P2<String,CheckResult>> check(List<Class<T>> c,
                                                     String... categories)
Returns the results and names of checking the properties on the given classes using a standard random generator.

Parameters:
c - The classes to check the properties of.
categories - The categories of properties to return. If no categories are specified, all candidate properties are returned, otherwise, only those properties in the given categories are returned (properties in no category are omitted in this latter case).
Returns:
The results and names of checking the properties on the given classes using a standard random generator.

check

public static <T> List<P2<String,CheckResult>> check(List<Class<T>> c,
                                                     List<String> categories)
Returns the results and names of checking the properties on the given classes using a standard random generator.

Parameters:
c - The classes to check the properties of.
categories - The categories of properties to return. If no categories are specified, all candidate properties are returned, otherwise, only those properties in the given categories are returned (properties in no category are omitted in this latter case).
Returns:
The results and names of checking the properties on the given classes using a standard random generator.

check

public static <T> List<P2<String,CheckResult>> check(List<Class<T>> c,
                                                     Rand r,
                                                     String... categories)
Returns the results and names of checking the properties on the given classes.

Parameters:
c - The classes to check the properties of.
r - The random generator to use to check the properties on the given classes.
categories - The categories of properties to return. If no categories are specified, all candidate properties are returned, otherwise, only those properties in the given categories are returned (properties in no category are omitted in this latter case).
Returns:
The results and names of checking the properties on the given classes.

check

public static <T> List<P2<String,CheckResult>> check(List<Class<T>> c,
                                                     Rand r,
                                                     List<String> categories)
Returns the results and names of checking the properties on the given classes.

Parameters:
c - The classes to check the properties of.
r - The random generator to use to check the properties on the given classes.
categories - The categories of properties to return. If no categories are specified, all candidate properties are returned, otherwise, only those properties in the given categories are returned (properties in no category are omitted in this latter case).
Returns:
The results and names of checking the properties on the given classes.

check

public static <T> List<P2<String,CheckResult>> check(Class<T> c,
                                                     String... categories)
Returns the results and names of checking the properties on the given class using a standard random generator.

Parameters:
c - The class to check the properties of.
categories - The categories of properties to return. If no categories are specified, all candidate properties are returned, otherwise, only those properties in the given categories are returned (properties in no category are omitted in this latter case).
Returns:
The results and names of checking the properties on the given class using a standard random generator.

check

public static <T> List<P2<String,CheckResult>> check(Class<T> c,
                                                     List<String> categories)
Returns the results and names of checking the properties on the given class using a standard random generator.

Parameters:
c - The class to check the properties of.
categories - The categories of properties to return. If no categories are specified, all candidate properties are returned, otherwise, only those properties in the given categories are returned (properties in no category are omitted in this latter case).
Returns:
The results and names of checking the properties on the given class using a standard random generator.

check

public static <T> List<P2<String,CheckResult>> check(Class<T> c,
                                                     Rand r,
                                                     String... categories)
Returns the results and names of checking the properties on the given class.

Parameters:
c - The class to check the properties of.
r - The random generator to use to check the properties on the given class.
categories - The categories of properties to return. If no categories are specified, all candidate properties are returned, otherwise, only those properties in the given categories are returned (properties in no category are omitted in this latter case).
Returns:
The results of checking the properties on the given class.

check

public static <T> List<P2<String,CheckResult>> check(Class<T> c,
                                                     Rand r,
                                                     List<String> categories)
Returns the results and names of checking the properties on the given class.

Parameters:
c - The class to check the properties of.
r - The random generator to use to check the properties on the given class.
categories - The categories of properties to return. If no categories are specified, all candidate properties are returned, otherwise, only those properties in the given categories are returned (properties in no category are omitted in this latter case).
Returns:
The results of checking the properties on the given class.

properties

public static <U,T extends U> List<P3<Property,String,Option<CheckParams>>> properties(Class<T> c,
                                                                                       String... categories)
Returns all properties, their name and possible check parameters in a given class that are found reflectively and according to various annotations. For example, properties or their enclosing class that are annotated with NoCheck are not considered. The name of a property is specified by the annotation or if this annotation is not present, the name of the method or field that represents the property.

Parameters:
c - The class to look for properties on.
categories - The categories of properties to return. If no categories are specified, all candidate properties are returned, otherwise, only those properties in the given categories are returned (properties in no category are omitted in this latter case).
Returns:
All properties, their name and possible check parameters in a given class that are found reflectively and according to various annotations.

Copyright 2008 - 2009 Tony Morris, Runar Bjarnason, Tom Adams, Brad Clow, Ricky Clarkson, Nick Partridge, Jason Zaugg

This software is released under an open source BSD licence.