Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3


This is a good example because:

  • It shows using a Builder to aid in construction of something difficult
  • StyleBuilder itself makes use of two Factories: StyleFactory and FilterFactory

This is a bad example because:

  • StyleBuilder does not actually hold state (it only consists of "nicer" create methods)
  • as such it is probably misnamed

Chaining utility classes together like this allows us to minimize the need for explicitly showing a cascade of factory injection.