net.sourceforge.domian.specification
Class MethodParameterizedSpecification<T,F>

java.lang.Object
  extended by net.sourceforge.domian.specification.AbstractSpecification<T>
      extended by net.sourceforge.domian.specification.ParameterizedSpecification<T,F>
          extended by net.sourceforge.domian.specification.MethodParameterizedSpecification<T,F>
All Implemented Interfaces:
LeafSpecification<T>, Specification<T>

final class MethodParameterizedSpecification<T,F>
extends ParameterizedSpecification<T,F>

A parameterized specification deals, as opposed to value bound specifications, also with value context. In this specification, this context is a class method.

For candidate objects to be approved by a parameterized specifications, two things must be fulfilled:

  1. The candidate method must be successfully invoked
  2. The return value must then be approved by the provided Specification

Since:
0.3
Author:
Eirik Torske

Field Summary
 
Fields inherited from class net.sourceforge.domian.specification.ParameterizedSpecification
accessibleObject, accessibleObjectSpecification, parameterizedSpecificationWithConjunctionSpec, parameterizedSpecificationWithDisjunctionSpec
 
Fields inherited from class net.sourceforge.domian.specification.AbstractSpecification
type
 
Constructor Summary
MethodParameterizedSpecification(java.lang.Class<T> declaringClass, java.lang.reflect.Method method, Specification<F> accessibleObjectSpecification)
           
 
Method Summary
(package private)  java.lang.String getName()
           
 java.lang.Boolean isSatisfiedBy(T candidate)
           
 
Methods inherited from class net.sourceforge.domian.specification.ParameterizedSpecification
createParameterizedSpecification, equals, getAccessibleObject, getAccessibleObjectSpecification, getAccessibleObjectSpecificationType, getAllSpecifications, getDeclaringClass, hasConjunction, hasDisjunction, hashCode, isDisjointWith, isValidFieldName
 
Methods inherited from class net.sourceforge.domian.specification.AbstractSpecification
and, containsSimpleCompositesOnly, containsValueBoundSpecificationsOnly, createValueBoundSpecification, getNegatedSpecification, getNumberOfLevelsOfNegations, getType, intersectsWith, invert, isGeneralizationOf, isIntersectionOf, isInvertible, isOddNumber, isSpecialCaseOf, or, purify, toString, where
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface net.sourceforge.domian.specification.Specification
and, getType, isGeneralizationOf, isSpecialCaseOf, or, where
 

Constructor Detail

MethodParameterizedSpecification

MethodParameterizedSpecification(java.lang.Class<T> declaringClass,
                                 java.lang.reflect.Method method,
                                 Specification<F> accessibleObjectSpecification)
Method Detail

getName

java.lang.String getName()
Specified by:
getName in class ParameterizedSpecification<T,F>

isSatisfiedBy

public java.lang.Boolean isSatisfiedBy(T candidate)


Copyright © 2006-2010. All Rights Reserved.