Java detect circular references during custom cloning
<p>I am writing a custom clone method for each entity. for deep copy is there a way to detect circular references or do I have to manually figure it out and restrict cloning to be unidirectional instead of bidirectional.</p>

<p>For example we use hibernate an hence a User object has a reference to Address and Address has a reference to User. Trying to see if doing a deep copy of Address as well as User is possible without running into circular reference issues</p>
