Eclipse has a convenient feature when you're paused in the debugger that shows an ID for every instance. They appear to be sequential and based on when an instance was allocated:
I find these extremely useful when I'm digging into a substantial problem, as they're usually small integers that are a lot easier to remember than the full hash codes, or some other internal ID. They're a very quick check for "is this still the object I think it is?" when you're stepping through complex and deep callstacks.
Are these allocation IDs tracked by the jvm itself, or are they something Eclipse is providing through some unknown mechanism?
Is there any way to get at them from code, so that I can temporarily put them in log messages while debugging?
I don't really want to add an ID field to every object, there's many good reasons why that is a Bad Idea.