JaroslavTulach at 05:36, 21 April 2009 - 2009-04-21 05:36:09

←Older revision Revision as of 05:36, 21 April 2009
Line 8: Line 8:
More advanced implementation of the same concept can be found in the [[Lookup]] library. It supports multiple results, notification of changes, etc.
More advanced implementation of the same concept can be found in the [[Lookup]] library. It supports multiple results, notification of changes, etc.
 +
 +
[[Category:APIDesignPatterns]]
 +
[[Category:APIDesignPatterns:Evolution]]

JaroslavTulach: New page: A pattern to support meta-morphosis of an object into another. In its simplest incarnation it can take form of a single method: <source lang="java"> <T> T reincarnate(Class<T> type); </so... - 2009-04-21 05:34:30

New page: A pattern to support meta-morphosis of an object into another. In its simplest incarnation it can take form of a single method: <source lang="java"> <T> T reincarnate(Class<T> type); </so...

New page

A pattern to support meta-morphosis of an object into another. In its simplest incarnation it can take form of a single method:

<source lang="java">
<T> T reincarnate(Class<T> type);
</source>

The method either return instance of the given type, or null if the caller cannot be converted into given object.

More advanced implementation of the same concept can be found in the [[Lookup]] library. It supports multiple results, notification of changes, etc.