下面列出了java.lang.management.LockInfo#getClassName ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。
private static void checkLockInfo(LockInfo li)
throws Exception {
if (!li.getClassName().equals(lockInfo.getClassName())) {
throw new RuntimeException("Class Name = " +
li.getClassName() + " expected = " + lockInfo.getClassName());
}
if (li.getIdentityHashCode() != lockInfo.getIdentityHashCode()) {
throw new RuntimeException("Class Name = " +
li.getIdentityHashCode() + " expected = " +
lockInfo.getIdentityHashCode());
}
}
private static void checkLockInfo(LockInfo li)
throws Exception {
if (!li.getClassName().equals(lockInfo.getClassName())) {
throw new RuntimeException("Class Name = " +
li.getClassName() + " expected = " + lockInfo.getClassName());
}
if (li.getIdentityHashCode() != lockInfo.getIdentityHashCode()) {
throw new RuntimeException("Class Name = " +
li.getIdentityHashCode() + " expected = " +
lockInfo.getIdentityHashCode());
}
}
private static void checkLockInfo(LockInfo li)
throws Exception {
if (!li.getClassName().equals(lockInfo.getClassName())) {
throw new RuntimeException("Class Name = " +
li.getClassName() + " expected = " + lockInfo.getClassName());
}
if (li.getIdentityHashCode() != lockInfo.getIdentityHashCode()) {
throw new RuntimeException("Class Name = " +
li.getIdentityHashCode() + " expected = " +
lockInfo.getIdentityHashCode());
}
}
private static void checkLockInfo(LockInfo li)
throws Exception {
if (!li.getClassName().equals(lockInfo.getClassName())) {
throw new RuntimeException("Class Name = " +
li.getClassName() + " expected = " + lockInfo.getClassName());
}
if (li.getIdentityHashCode() != lockInfo.getIdentityHashCode()) {
throw new RuntimeException("Class Name = " +
li.getIdentityHashCode() + " expected = " +
lockInfo.getIdentityHashCode());
}
}
private static void checkLockInfo(LockInfo li)
throws Exception {
if (!li.getClassName().equals(lockInfo.getClassName())) {
throw new RuntimeException("Class Name = " +
li.getClassName() + " expected = " + lockInfo.getClassName());
}
if (li.getIdentityHashCode() != lockInfo.getIdentityHashCode()) {
throw new RuntimeException("Class Name = " +
li.getIdentityHashCode() + " expected = " +
lockInfo.getIdentityHashCode());
}
}
private static void checkLockInfo(LockInfo li)
throws Exception {
if (!li.getClassName().equals(lockInfo.getClassName())) {
throw new RuntimeException("Class Name = " +
li.getClassName() + " expected = " + lockInfo.getClassName());
}
if (li.getIdentityHashCode() != lockInfo.getIdentityHashCode()) {
throw new RuntimeException("Class Name = " +
li.getIdentityHashCode() + " expected = " +
lockInfo.getIdentityHashCode());
}
}
private static void checkLockInfo(LockInfo li)
throws Exception {
if (!li.getClassName().equals(lockInfo.getClassName())) {
throw new RuntimeException("Class Name = " +
li.getClassName() + " expected = " + lockInfo.getClassName());
}
if (li.getIdentityHashCode() != lockInfo.getIdentityHashCode()) {
throw new RuntimeException("Class Name = " +
li.getIdentityHashCode() + " expected = " +
lockInfo.getIdentityHashCode());
}
}
private static void checkLockInfo(LockInfo li)
throws Exception {
if (!li.getClassName().equals(lockInfo.getClassName())) {
throw new RuntimeException("Class Name = " +
li.getClassName() + " expected = " + lockInfo.getClassName());
}
if (li.getIdentityHashCode() != lockInfo.getIdentityHashCode()) {
throw new RuntimeException("Class Name = " +
li.getIdentityHashCode() + " expected = " +
lockInfo.getIdentityHashCode());
}
}
private static void checkLockInfo(LockInfo li)
throws Exception {
if (!li.getClassName().equals(lockInfo.getClassName())) {
throw new RuntimeException("Class Name = " +
li.getClassName() + " expected = " + lockInfo.getClassName());
}
if (li.getIdentityHashCode() != lockInfo.getIdentityHashCode()) {
throw new RuntimeException("Class Name = " +
li.getIdentityHashCode() + " expected = " +
lockInfo.getIdentityHashCode());
}
}
private static void checkLockInfo(LockInfo li)
throws Exception {
if (!li.getClassName().equals(lockInfo.getClassName())) {
throw new RuntimeException("Class Name = " +
li.getClassName() + " expected = " + lockInfo.getClassName());
}
if (li.getIdentityHashCode() != lockInfo.getIdentityHashCode()) {
throw new RuntimeException("Class Name = " +
li.getIdentityHashCode() + " expected = " +
lockInfo.getIdentityHashCode());
}
}
private static void checkLockInfo(LockInfo li)
throws Exception {
if (!li.getClassName().equals(lockInfo.getClassName())) {
throw new RuntimeException("Class Name = " +
li.getClassName() + " expected = " + lockInfo.getClassName());
}
if (li.getIdentityHashCode() != lockInfo.getIdentityHashCode()) {
throw new RuntimeException("Class Name = " +
li.getIdentityHashCode() + " expected = " +
lockInfo.getIdentityHashCode());
}
}
private static void checkLockInfo(LockInfo li)
throws Exception {
if (!li.getClassName().equals(lockInfo.getClassName())) {
throw new RuntimeException("Class Name = " +
li.getClassName() + " expected = " + lockInfo.getClassName());
}
if (li.getIdentityHashCode() != lockInfo.getIdentityHashCode()) {
throw new RuntimeException("Class Name = " +
li.getIdentityHashCode() + " expected = " +
lockInfo.getIdentityHashCode());
}
}
private static void checkLockInfo(LockInfo li)
throws Exception {
if (!li.getClassName().equals(lockInfo.getClassName())) {
throw new RuntimeException("Class Name = " +
li.getClassName() + " expected = " + lockInfo.getClassName());
}
if (li.getIdentityHashCode() != lockInfo.getIdentityHashCode()) {
throw new RuntimeException("Class Name = " +
li.getIdentityHashCode() + " expected = " +
lockInfo.getIdentityHashCode());
}
}
private static void checkLockInfo(LockInfo li)
throws Exception {
if (!li.getClassName().equals(lockInfo.getClassName())) {
throw new RuntimeException("Class Name = " +
li.getClassName() + " expected = " + lockInfo.getClassName());
}
if (li.getIdentityHashCode() != lockInfo.getIdentityHashCode()) {
throw new RuntimeException("Class Name = " +
li.getIdentityHashCode() + " expected = " +
lockInfo.getIdentityHashCode());
}
}
@Override
public LI getLockInfo(ThreadInfo threadInfo) {
LockInfo lockInfo= threadInfo.getLockInfo();
if(lockInfo == null) {
return null;
}
return new LI(lockInfo.getClassName(), lockInfo.getIdentityHashCode());
}
private void printLock(StringBuilder sb, LockInfo lock) {
String id = Integer.toHexString(lock.getIdentityHashCode());
String className = lock.getClassName();
sb.append("<").append(id).append("> (a ").append(className).append(")"); // NOI18N
}
private void printLock(StringBuilder sb,LockInfo lock) {
String id = Integer.toHexString(lock.getIdentityHashCode());
String className = lock.getClassName();
sb.append("<").append(id).append("> (a ").append(className).append(")"); // NOI18N
}
private void printLock(StringBuilder sb, LockInfo lock) {
String id = Integer.toHexString(lock.getIdentityHashCode());
String className = lock.getClassName();
sb.append("<").append(id).append("> (a ").append(className).append(")"); // NOI18N
}
private void printLock(StringBuilder sb,LockInfo lock) {
String id = Integer.toHexString(lock.getIdentityHashCode());
String className = lock.getClassName();
sb.append("<").append(id).append("> (a ").append(className).append(")"); // NOI18N
}
/**
* Initialize this lock information from a {@link LockInfo}.
* @param lockInfo the fully qualified class name of this lock.
*/
public LockInformation(final LockInfo lockInfo) {
this(lockInfo.getClassName(), lockInfo.getIdentityHashCode());
}