Add support for marking attributes as readOnly.