Total WebSite Views Count

Marker Interfaces

Explain marker interfaces?

  • The marker interface pattern is a design pattern in computer science, used with languages that provide run-time type information about objects
  • It provides a means to associate metadata with a class where the language does not have explicit support for such metadata. 
  • In java, it is used as interfaces with no method specified.

  • A good example of use of marker interface in java is Serializable interface. A class implements this interface to indicate that its non-transient data members can be written to a byte steam or file system.

  • major problem with marker interfaces is that an interface defines a contract for implementing classes, and that contract is inherited by all subclasses. 

  • This means that you cannot “un-implement” a marker. In the example given, if you create a subclass that you do not want to serialize (perhaps because it depends on transient state), you must resort to explicitly throwing NotSerializableException.

AWS Services

AWS Services

Technology Selection & Evaluation Criteria

Technology Selection & Evaluation Criteria

Scale Cube - Scale In X Y Z Cube

Scale Cube - Scale In X Y Z Cube

Feature Post

AWS Services

About Me

About Me

Spring Cloud

Spring Cloud
Spring Cloud

Spring Cloud +mCloud Native + Big Data Archittect

Spring Cloud +mCloud Native + Big Data Archittect

ACID Transaction

ACID Transaction

Data Pipe Line Stack

Data Pipe Line Stack

Popular Posts