OverwriteFeature
The OverwriteFeature is a standard FeatureDef automatically used by ComponentMaker? objects to weave class attributes. This FeatureDef's implementation of the FeatureWeaving interface just inserts the currently supplied item
into the output dictionary of the ComponentMaker?, erasing anything which was there previously.
Thus, the default behavior when you place an attribute in an aspect or nested class, is to override the definition of that attribute made in a lower-precedence aspect layer.
The presence and use of the OverwriteFeature is controlled by the FeatureMapping
method of the ComponentMaker? being used. The default implementation of this feature is the _DefaultFeatureMapping()
function in the TW.Features
module, but it can be overridden by passing a keyword argument at WeavingTime?.