Returns a bitmask of the current flags for the object.
This method is not often used in production code.