Lets Ban Some Words
wrttn.in
wrttn.in
Framework: yes and no. Sometimes you can separate your concerns much more effectively by declaring that a certain part of the code is only concerned with UI, or database access, or something. At that point, declaring this piece to be a framework helps keep your code clean.
Pattern: urgh. I've written code exactly like what I see there, but it was for the case where there are four different cases and I expect there to be more. I hates that code, but it is indeed a way to work around language deficiencies; if you don't like it, use a better language.
Abstract: I would agree except that the java syntax for defining a delegate inline is so verbose. The client code for the example given looks like:
new Once<Void>() { protected T expensiveCalculation(){ return null;} };
If you write it the way the author suggests, this becomes new Once<Void>(new Callable<Void>() { public Void call(){ return null;} });
And when the object needs to be Serializable the "reuse existing ecosystem" argument no longer applies, because you have to declare your own SerializableCallable interface and use that, and none of the existing Callable ecosystem implements it.