java.lang.Object | ||
↳ | org.apache.commons.betwixt.strategy.ClassNormalizer | |
↳ | org.apache.commons.betwixt.strategy.ListedClassNormalizer |
ClassNormalizer that uses a list of substitutions.
This ClassNormalizer
checks a list (in order) to find a matching
Class.
This match can be performed either strictly (using equality) or taking into account
inheritance and implementation.
If a match is found then the first substituted class is returned as the normalization.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Adds the given substitute to the list.
| |||||||||||
Adds this given substitution to the list.
| |||||||||||
Is strict checking of substitutions on?
| |||||||||||
Normalize given class.
| |||||||||||
Sets strict checking of substitutions?
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
org.apache.commons.betwixt.strategy.ClassNormalizer
| |||||||||||
From class
java.lang.Object
|
Adds the given substitute to the list.
This is a convenience method useful when isStrickCheck()
is false.
In this case, any subclasses (if this is a class) or implementating classes
if this is an interface) will be subsituted with this value.
substitute | sustitude this Class |
---|
Adds this given substitution to the list. No warning is given if the match has already been added to the list.
match | if any classes matching this then the normal class will be substituted |
---|---|
substitute | the normalized Class if the primary class is matched |
Is strict checking of substitutions on?
Normalize given class. The normalized Class is the Class that Betwixt should introspect. This strategy class allows the introspected Class to be varied.
clazz | the class to normalize, not null |
---|
isStrickCheck()
then equality
is used otherwise isAssignableFrom is used (so that super class and interfaces are matched).
Sets strict checking of substitutions?
strickCheck | if true then equality will be used to compare classes when considering substition, otherwise isAssignableFrom will be used so that super classes and super interfaces will be matched. |
---|