org.apache.commons.betwixt.strategy.impl.propertysuppression
Class PackageSuppressor

java.lang.Object
  extended byorg.apache.commons.betwixt.strategy.PropertySuppressionStrategy
      extended byorg.apache.commons.betwixt.strategy.impl.propertysuppression.PackageSuppressor

public class PackageSuppressor
extends PropertySuppressionStrategy

Suppresses properties based on the package of their type. Limited regex is supported. If the package name ends in .* them all child packages will be suppressed.

Since:
0.8
Author:
Jakarta Commons Team of the Apache Software Foundation

Nested Class Summary
 
Nested classes inherited from class org.apache.commons.betwixt.strategy.PropertySuppressionStrategy
PropertySuppressionStrategy.Chain, PropertySuppressionStrategy.Default
 
Field Summary
private  boolean exact
           
private  java.lang.String suppressedPackage
          Package to be suppressed
 
Fields inherited from class org.apache.commons.betwixt.strategy.PropertySuppressionStrategy
DEFAULT
 
Constructor Summary
PackageSuppressor(java.lang.String suppressedPackage)
          Constructs a suppressor for packages.
 
Method Summary
 boolean suppressProperty(java.lang.Class classContainingTheProperty, java.lang.Class propertyType, java.lang.String propertyName)
          Should the given property be suppressed?
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

suppressedPackage

private final java.lang.String suppressedPackage
Package to be suppressed


exact

private final boolean exact
Constructor Detail

PackageSuppressor

public PackageSuppressor(java.lang.String suppressedPackage)
Constructs a suppressor for packages.

Parameters:
suppressedPackage - package name (for exact match) or base package and .*to suppress children
Method Detail

suppressProperty

public boolean suppressProperty(java.lang.Class classContainingTheProperty,
                                java.lang.Class propertyType,
                                java.lang.String propertyName)
Description copied from class: PropertySuppressionStrategy
Should the given property be suppressed?

Specified by:
suppressProperty in class PropertySuppressionStrategy
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

toString

public java.lang.String toString()