Using annotations instead of marker interface