As pointed out earlier on this page, for the fluent interface to work, we must build an intermediate representation of the mixin configuration called the builder. Do not confuse the builder for the mixin configuration. What you build with chained methods like
is NOT the actual mixin configuration, it is the builder, an intermediate representation. Each method like
SuppressMixin does NOT give you an actual configuration item, it gives you some object that represents which methods you have piled on top of each other so far.
It is the final
BuildConfiguration () method at the end that returns the actual mixin configuration instance. If you forget that
BuildConfiguration (), you will get an instance of the wrong type, resulting in type errors (at compile time).
What's more, the "Build" in
BuildConfiguration has a meaning that is very different from that of methods like
BuildFromActive () or
BuildConfiguration ()is a method of an instance of the intermediate representation. It gives you the mixin configuration you have assembled one configuration item at a time.
BuildEmpty ()is a static method of the
MixinConfigurationclass and gives you an (empty, virgin, uninitialized) instance of the intermediate representation, ready for method chaining (= the fluent interface).
- Along similiar lines,
BuildFromActiveis a method like
BuildEmpty (), only that it constructs an intermediate representation from the active configuration instead of an empty one.