org.apache.commons.betwixt.strategy
Class PropertySuppressionStrategy

java.lang.Object
  extended by org.apache.commons.betwixt.strategy.PropertySuppressionStrategy
Direct Known Subclasses:
PackageSuppressor, PropertySuppressionStrategy.Chain, PropertySuppressionStrategy.Default

public abstract class PropertySuppressionStrategy
extends java.lang.Object

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

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

Nested Class Summary
static class PropertySuppressionStrategy.Chain
          Implementation delegates to a list of strategies
static class PropertySuppressionStrategy.Default
          Default implementation.
 
Field Summary
static PropertySuppressionStrategy DEFAULT
          Default implementation suppresses 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 suppresses 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


Copyright © 2002-2008 The Apache Software Foundation. All Rights Reserved.