Errata 8
From APIDesign
Line 1: | Line 1: | ||
- | ==== Page 132 ==== | + | ==== [[Errata 8|Page 132]] ==== |
Implementation of ''Playback'' interface should be named ''MyPlaybackPrints'' instead of ''MyCallbackPrints''. | Implementation of ''Playback'' interface should be named ''MyPlaybackPrints'' instead of ''MyCallbackPrints''. | ||
- | ==== Page 134 ==== | + | ==== [[Errata 8|Page 134]] ==== |
There should be ''append'' method mentioned (instead of ''write'') in this sentence: "This is reasonable behavior for implementors because those who subclassed ''Writer'' have not implemented the new ''write'' method." | There should be ''append'' method mentioned (instead of ''write'') in this sentence: "This is reasonable behavior for implementors because those who subclassed ''Writer'' have not implemented the new ''write'' method." | ||
- | ==== Page 140 ==== | + | ==== [[Errata 8|Page 140]] ==== |
While introducing code for separating API/SPI concerns, after saying "''Say the original version of Writer looked like the following:''", ''final Writer'''s code is shown with one of its methods being "create(''java.io.Writer'')", which implies java.io.Writer's pre-existence. | While introducing code for separating API/SPI concerns, after saying "''Say the original version of Writer looked like the following:''", ''final Writer'''s code is shown with one of its methods being "create(''java.io.Writer'')", which implies java.io.Writer's pre-existence. |
Revision as of 03:09, 12 September 2009
Page 132
Implementation of Playback interface should be named MyPlaybackPrints instead of MyCallbackPrints.
Page 134
There should be append method mentioned (instead of write) in this sentence: "This is reasonable behavior for implementors because those who subclassed Writer have not implemented the new write method."
Page 140
While introducing code for separating API/SPI concerns, after saying "Say the original version of Writer looked like the following:", final Writer's code is shown with one of its methods being "create(java.io.Writer)", which implies java.io.Writer's pre-existence. I am guessing that that method is there for convenience, because otherwise all java.io.Writer's method bodies should have been copied over into an Impl implementation in order to be able to run the sample source code, but for clarity, that method should probably not appear in that paragraph (maybe just in the downloadable source code with comments in its header).
True, the "create(java.io.Writer)" method is not really necessary. On the other hand it provides real world example of the API use, matching it to some API familiar to the user. It demonstrates that the new Writer is good enough replacement for the standard java.io.Writer. It shows later that by evolving the SPI to understand CharSequences the delegation to java.io.Writer can be done much more easily.
--JaroslavTulach 18:45, 31 July 2009 (UTC)