Tuesday, October 02, 2007

Marker Interface

In the world of java, it is a common approach to have something called Marker interface. These interface itself will not have any methods defined but marks the class which implements it as the special type.

E.g Serializable interface, just marks the class that it can be Serialized. But when it comes to exact serialization java depends on the naming convention though. Also we can mark a class as Singleton class using this technique. However, in the .Net world. it can be better managed using Attribute programming.

0 comments: