本文整理了Java中org.apache.commons.logging.LogFactory.objectId()
方法的一些代码示例,展示了LogFactory.objectId()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。LogFactory.objectId()
方法的具体详情如下:
包路径:org.apache.commons.logging.LogFactory
类名称:LogFactory
方法名:objectId
[英]Returns a string that uniquely identifies the specified object, including its class.
The returned string is of form "classname@hashcode", ie is the same as the return value of the Object.toString() method, but works even when the specified object's class has overidden the toString method.
[中]返回唯一标识指定对象(包括其类)的字符串。
返回的字符串的格式为“classname@hashcode,ie与Object.toString()方法的返回值相同,但即使指定对象的类已覆盖了toString方法,ie仍然有效。
代码示例来源:origin: commons-logging/commons-logging
if (classLoader != null) {
final String classLoaderString = classLoader.toString();
logDiagnostic(prefix + objectId(classLoader) + " == '" + classLoaderString + "'");
final StringBuffer buf = new StringBuffer(prefix + "ClassLoader tree:");
for(;;) {
buf.append(objectId(classLoader));
if (classLoader == systemClassLoader) {
buf.append(" (SYSTEM) ");
代码示例来源:origin: robovm/robovm
classLoaderName = "BOOTLOADER";
} else {
classLoaderName = objectId(classLoader);
代码示例来源:origin: robovm/robovm
if (classLoader != null) {
final String classLoaderString = classLoader.toString();
logDiagnostic(prefix + objectId(classLoader) + " == '" + classLoaderString + "'");
StringBuffer buf = new StringBuffer(prefix + "ClassLoader tree:");
for(;;) {
buf.append(objectId(classLoader));
if (classLoader == systemClassLoader) {
buf.append(" (SYSTEM) ");
代码示例来源:origin: commons-logging/commons-logging
/**
* Release any internal references to previously created {@link LogFactory}
* instances that have been associated with the specified class loader
* (if any), after calling the instance method <code>release()</code> on
* each of them.
*
* @param classLoader ClassLoader for which to release the LogFactory
*/
public static void release(ClassLoader classLoader) {
if (isDiagnosticsEnabled()) {
logDiagnostic("Releasing factory for classloader " + objectId(classLoader));
}
// factories is not final and could be replaced in this block.
final Hashtable factories = LogFactory.factories;
synchronized (factories) {
if (classLoader == null) {
if (nullClassLoaderFactory != null) {
nullClassLoaderFactory.release();
nullClassLoaderFactory = null;
}
} else {
final LogFactory factory = (LogFactory) factories.get(classLoader);
if (factory != null) {
factory.release();
factories.remove(classLoader);
}
}
}
}
代码示例来源:origin: commons-logging/commons-logging
logDiagnostic("Created object " + objectId(result) + " to manage classloader " +
objectId(contextClassLoader));
代码示例来源:origin: commons-logging/commons-logging
if (isDiagnosticsEnabled()) {
logDiagnostic("Loaded class " + logFactoryClass.getName() +
" from classloader " + objectId(classLoader));
" loaded from classloader " + objectId(logFactoryClass.getClassLoader()) +
" does not extend '" + LogFactory.class.getName() +
"' as loaded by this classloader.");
"' via classloader " + objectId(classLoader));
" via classloader " + objectId(classLoader) +
" - it depends on some other class that cannot be found.");
logDiagnostic("Unable to load factory class via classloader " + objectId(classLoader) +
" - trying the classloader associated with this LogFactory.");
代码示例来源:origin: robovm/robovm
/**
* Release any internal references to previously created {@link LogFactory}
* instances that have been associated with the specified class loader
* (if any), after calling the instance method <code>release()</code> on
* each of them.
*
* @param classLoader ClassLoader for which to release the LogFactory
*/
public static void release(ClassLoader classLoader) {
if (isDiagnosticsEnabled()) {
logDiagnostic("Releasing factory for classloader " + objectId(classLoader));
}
synchronized (factories) {
if (classLoader == null) {
if (nullClassLoaderFactory != null) {
nullClassLoaderFactory.release();
nullClassLoaderFactory = null;
}
} else {
LogFactory factory = (LogFactory) factories.get(classLoader);
if (factory != null) {
factory.release();
factories.remove(classLoader);
}
}
}
}
代码示例来源:origin: commons-logging/commons-logging
logDiagnostic("[ENV] Class " + className + " was loaded via classloader " + objectId(classLoader));
logHierarchy("[ENV] Ancestry of classloader which loaded " + className + " is ", classLoader);
代码示例来源:origin: robovm/robovm
"Created object " + objectId(result)
+ " to manage classloader " + objectId(contextClassLoader));
代码示例来源:origin: robovm/robovm
logDiagnostic(
"Loaded class " + logFactoryClass.getName()
+ " from classloader " + objectId(classLoader));
logDiagnostic(
"Factory class " + logFactoryClass.getName()
+ " loaded from classloader " + objectId(logFactoryClass.getClassLoader())
+ " does not extend '" + LogFactory.class.getName()
+ "' as loaded by this classloader.");
logDiagnostic(
"Unable to locate any class called '" + factoryClass
+ "' via classloader " + objectId(classLoader));
logDiagnostic(
"Class '" + factoryClass + "' cannot be loaded"
+ " via classloader " + objectId(classLoader)
+ " - it depends on some other class that cannot"
+ " be found.");
logDiagnostic(
"Unable to load factory class via classloader "
+ objectId(classLoader)
+ " - trying the classloader associated with this LogFactory.");
代码示例来源:origin: robovm/robovm
+ objectId(classLoader));
logHierarchy("[ENV] Ancestry of classloader which loaded " + className + " is ", classLoader);
代码示例来源:origin: commons-logging/commons-logging
logDiagnostic(
"[LOOKUP] LogFactory implementation requested for the first time for context classloader " +
objectId(contextClassLoader));
logHierarchy("[LOOKUP] ", contextClassLoader);
代码示例来源:origin: robovm/robovm
logDiagnostic(
"[LOOKUP] LogFactory implementation requested for the first time for context classloader "
+ objectId(contextClassLoader));
logHierarchy("[LOOKUP] ", contextClassLoader);
代码示例来源:origin: camunda/camunda-bpm-platform
classLoaderName = "BOOTLOADER";
} else {
classLoaderName = objectId(classLoader);
代码示例来源:origin: camunda/camunda-bpm-platform
classLoaderName = "BOOTLOADER";
} else {
classLoaderName = objectId(classLoader);
代码示例来源:origin: camunda/camunda-bpm-platform
if (classLoader != null) {
final String classLoaderString = classLoader.toString();
logDiagnostic(prefix + objectId(classLoader) + " == '" + classLoaderString + "'");
StringBuffer buf = new StringBuffer(prefix + "ClassLoader tree:");
for(;;) {
buf.append(objectId(classLoader));
if (classLoader == systemClassLoader) {
buf.append(" (SYSTEM) ");
代码示例来源:origin: camunda/camunda-bpm-platform
/**
* Release any internal references to previously created {@link LogFactory}
* instances that have been associated with the specified class loader
* (if any), after calling the instance method <code>release()</code> on
* each of them.
*
* @param classLoader ClassLoader for which to release the LogFactory
*/
public static void release(ClassLoader classLoader) {
if (isDiagnosticsEnabled()) {
logDiagnostic("Releasing factory for classloader " + objectId(classLoader));
}
synchronized (factories) {
if (classLoader == null) {
if (nullClassLoaderFactory != null) {
nullClassLoaderFactory.release();
nullClassLoaderFactory = null;
}
} else {
LogFactory factory = (LogFactory) factories.get(classLoader);
if (factory != null) {
factory.release();
factories.remove(classLoader);
}
}
}
}
代码示例来源:origin: camunda/camunda-bpm-platform
"Created object " + objectId(result)
+ " to manage classloader " + objectId(contextClassLoader));
代码示例来源:origin: camunda/camunda-bpm-platform
"Class '" + badClass.getName()
+ "' was found in classloader "
+ objectId(badClassLoader)
+ ". It is bound to a Log interface which is not"
+ " the one loaded from classloader "
+ objectId(logInterfaceClassLoader));
} catch (Throwable t) {
logDiagnostic(
代码示例来源:origin: camunda/camunda-bpm-platform
+ objectId(classLoader));
logHierarchy("[ENV] Ancestry of classloader which loaded " + className + " is ", classLoader);
内容来源于网络,如有侵权,请联系作者删除!