Compelling Reasons to Use Marker Interfaces Instead of Attributes

I generally avoid “marker interfaces” because they don’t allow you to unmark a derived type. But that aside, here are some of the specific cases that I have seen where marker interfaces would be preferable to built-in meta-data support: Run-time performance sensitive situations. Compatibility with languages that don’t support annotation or attributes. Any context where … Read more

What is the use of marker interfaces in Java?

Joshua Bloch: Effective Java 2nd Edition, p 179 Item 37: Use marker interfaces to define types … You may hear it said that marker annotations (Item 35) make marker interfaces obsolete. This assertion is incorrect. Marker interfaces have two advantages over marker annotations. First and foremost, marker interfaces define a type that is implemented by … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)