Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
Let’s go back to the problem that I talked about when investigating the principle of separating use from construction. Recall that the idea is this: By wrapping the constructor of ByteFilter in the static getInstance() method, it is easier for ByteFilter to evolve into an abstract class and then for getInstance() to return a subclass, perhaps one of many possible subclasses, without changing the client object SignalProcessor.
Here is the code, just to refresh your memory: