net.sf.qualitytest.blueprint
Class Match

java.lang.Object
  extended by net.sf.qualitytest.blueprint.Match

public final class Match
extends Object

A utility class to have a more readable API. This class holds possible method matching strategies.

Author:
Dominik Seichter

Field Summary
static MatchingStrategy BUILDER_METHODS
          Match all public methods of classes with a name ending in "Builder".
static MatchingStrategy SETTER_METHODS
          Match all methods which are setter-methods.
 
Method Summary
static MatchingStrategy instanceOf(Class<?> clazz)
          Match all classes that are instances of a type.
static MatchingStrategy name(String name)
          Match by method or attribute name..
static MatchingStrategy type(Class<?> clazz)
          Match a type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BUILDER_METHODS

public static final MatchingStrategy BUILDER_METHODS
Match all public methods of classes with a name ending in "Builder".


SETTER_METHODS

public static final MatchingStrategy SETTER_METHODS
Match all methods which are setter-methods.

Method Detail

instanceOf

public static MatchingStrategy instanceOf(Class<?> clazz)
Match all classes that are instances of a type.

Parameters:
clazz - Supertype that is matched
Returns:
a MatchingStrategy which matches the given type.

name

public static MatchingStrategy name(String name)
Match by method or attribute name..

Parameters:
name - Name of an attribute or method that is matched.
Returns:
a MatchingStrategy which matches the given type.

type

public static MatchingStrategy type(Class<?> clazz)
Match a type.

Parameters:
clazz - Type that is matched
Returns:
a MatchingStrategy which matches the given type.


Copyright © 2012-2013. All Rights Reserved.