|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.castor.core.util.CycleBreaker
public class CycleBreaker
lightweight mechanism for thread-safe detection of cyclic calls to hashCode or equals in objects created by the XML CodeGenerator.
Usage
Note : Do not use this cycle breaking mechanism on object comparisons where two instances may share the same reference to some third object, such as a String constant.
Constructor Summary | |
---|---|
CycleBreaker()
|
Method Summary | |
---|---|
static void |
releaseCycleHandle(java.lang.Object beingHashed)
Called to release Cycling lock for this object at the end of a routine where cycles are to be detected. |
static boolean |
startingToCycle(java.lang.Object beingHashed)
Test to see if we are about to begin cycling on a method call to beingHashed. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CycleBreaker()
Method Detail |
---|
public static boolean startingToCycle(java.lang.Object beingHashed)
beingHashed
- the object to check for a cycle.
public static void releaseCycleHandle(java.lang.Object beingHashed)
beingHashed
- the object for which the cycle-lock will be released.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |