Method holdsLock(Object obj)
Return type: boolean
Member of:
java.lang.Thread
[
api documentation
] [
main menu
]
Examples of how the element is used
(one line per example):
[
add your own example
]
1
assert Thread.holdsLock(this); // redundant - only called from aggregateAllocationResults
2
assert Thread.holdsLock(this);
3
boolean useBackedEnumerator = !Thread.holdsLock(this);
4
assert !Thread.holdsLock(distributorLock);
5
assert Thread.holdsLock(parseLock); // so it is OK to use documentBuilder
Java and J2SE are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States and other Countries.