net.sourceforge.domian.specification
Class FieldParameterizedSpecification<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.FieldParameterizedSpecification<T,F>
All Implemented Interfaces:
LeafSpecification<T>, Specification<T>

final class FieldParameterizedSpecification<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 field.

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

  1. A field value must be successfully extracted from the candidate object
  2. The field value must then be approved by the provided Specification

Since:
0.1
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
FieldParameterizedSpecification(java.lang.Class<T> declaringClass, java.lang.reflect.Field field, 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

FieldParameterizedSpecification

FieldParameterizedSpecification(java.lang.Class<T> declaringClass,
                                java.lang.reflect.Field field,
                                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.