org.apache.commons.betwixt.strategy
Class PropertySuppressionStrategy

java.lang.Object
  extended byorg.apache.commons.betwixt.strategy.PropertySuppressionStrategy

public abstract class PropertySuppressionStrategy
extends java.lang.Object

Pluggable strategy specifying whether property's should be surpressed. Implementations can be used to give rules about which properties should be ignored by Betwixt when introspecting.

Since:
0.7
Author:
Jakarta Commons Team, Apache Software Foundation

Field Summary
static PropertySuppressionStrategy DEFAULT
          Default implementation supresses the class property found on every object.
 
Constructor Summary
PropertySuppressionStrategy()
           
 
Method Summary
abstract  boolean suppressProperty(java.lang.Class classContainingTheProperty, java.lang.Class propertyType, java.lang.String propertyName)
          Should the given property be suppressed?
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT

public static final PropertySuppressionStrategy DEFAULT
Default implementation supresses the class property found on every object. Also, the isEmpty property is supressed for implementations of Collection.

Constructor Detail

PropertySuppressionStrategy

public PropertySuppressionStrategy()
Method Detail

suppressProperty

public abstract boolean suppressProperty(java.lang.Class classContainingTheProperty,
                                         java.lang.Class propertyType,
                                         java.lang.String propertyName)
Should the given property be suppressed?

Parameters:
classContainingTheProperty - Class giving the type of the bean containing the property propertyName
propertyType - Class giving the type of the property, not null
propertyName - the name of the property, not null
Returns:
true when the given property should be suppressed