|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.netbeans.spi.settings.Convertor
Convertor allows to read/write objects in own format and notify about object changes.
| Constructor Summary | |
Convertor()
|
|
| Method Summary | |
protected static Lookup |
findContext(Reader r)
get a context associated with the reader r. |
protected static Lookup |
findContext(Writer w)
get a context associated with the writer w. |
abstract Object |
read(Reader r)
Subclasses have to be able to read format implemented by write(java.io.Writer, java.lang.Object). |
abstract void |
registerSaver(Object inst,
Saver s)
register saver; convertor can provide own policy notifing
the saver about changes of setting object. |
abstract void |
unregisterSaver(Object inst,
Saver s)
unregister saver |
abstract void |
write(Writer w,
Object inst)
Subclasses can implement own storing format. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public Convertor()
| Method Detail |
public abstract void write(Writer w, Object inst) throws IOException
w - stream into which inst is writteninst - the setting object to be written
IOException - if the object cannot be writtenpublic abstract Object read(Reader r) throws IOException, ClassNotFoundException
write(java.io.Writer, java.lang.Object).
r - stream containing stored object
IOException - if the object cannot be read
ClassNotFoundException - if the object class cannot be resolvedpublic abstract void registerSaver(Object inst, Saver s)
saver; convertor can provide own policy notifing
the saver about changes of setting object. (e.g. register property
change listener)
inst - setting objects - saver implementationpublic abstract void unregisterSaver(Object inst, Saver s)
saver
inst - setting objects - saver implementationregisterSaver(java.lang.Object, org.netbeans.spi.settings.Saver)protected static Lookup findContext(Reader r)
r. It can contain
various info like a file location of the read object etc.
r - stream containing stored object
protected static Lookup findContext(Writer w)
w. It can contain
various info like a file location of the written object etc.
w - stream into which inst is written
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||