Home | History | Annotate | Download | only in impl

Lines Matching defs:class

36  * class to instantiate a wrapper for.</p>
40 * requested implementation class.</li>
42 * to identify the requested implementation class.</li>
51 * <p>If the selected {@link Log} implementation class has a
73 public class LogFactoryImpl extends LogFactory {
76 /** Log4JLogger class name */
78 /** Jdk14Logger class name */
80 /** Jdk13LumberjackLogger class name */
82 /** SimpleLog class name */
109 * property identifying our {@link Log} implementation class.
140 * determine system behaviour when a bad logging adapter class is
156 * determine system behaviour when a logging adapter class is
157 * encountered which has bound to the wrong Log class implementation.
162 * Default behaviour: true (tolerates bad Log class hierarchy)
172 * adapters. Each class is expected to implement the Log interface,
190 * classloader, or via the classloader that loaded this LogFactoryImpl class.
214 * Name of the class implementing the Log interface.
222 * implementation class that will be used to create new instances.
232 protected Class logConstructorSignature[] =
233 { java.lang.String.class };
246 protected Class logMethodSignature[] =
247 { LogFactory.class };
302 * Convenience method to derive a name from the specified class and
305 * @param clazz Class for which a suitable Log name will be derived
310 public Log getInstance(Class clazz) throws LogConfigurationException {
352 * class loader would prevent garbage collection.
448 protected static ClassLoader getClassLoader(Class clazz) {
464 * handled by the parent LogFactory class. This method just computes
477 Class clazz = this.getClass();
510 * @deprecated Never invoked by this class; subclasses should not assume
535 * @deprecated Never invoked by this class; subclasses should not assume
553 * @deprecated Never invoked by this class; subclasses should not assume
565 * is available. Also checks that the <code>Throwable</code> class
569 * @deprecated Never invoked by this class; subclasses should not assume
582 * @deprecated Never invoked by this class; subclasses should not assume
649 * affect the future behaviour of this class.
746 * class and that can be tweaked by the user. This is done when the first
747 * logger is created, not in the constructor of this class, because we
760 * Follows the discovery process described in the class javadoc.
783 logDiagnostic("Attempting to load user-specified log class '" +
791 StringBuffer messageBuffer = new StringBuffer("User-specified log class '");
871 // the first 5 characters of the adapter class right (ignoring case),
872 // then suggest the candidate adapter class name.
891 logDiagnostic("Trying to get log class from attribute '" + LOG_PROPERTY + "'");
897 logDiagnostic("Trying to get log class from attribute '" +
905 logDiagnostic("Trying to get log class from system property '" +
920 logDiagnostic("Trying to get log class from system property '" +
945 * Attempts to load the given class, find a suitable constructor,
956 * @return an instance of the given class, or null if the logging
976 Class logAdapterClass = null;
989 // Show the location of the first occurrence of the .class file
991 // will load the class from -- unless the classloader is doing
994 String resourceName = logAdapterClassName.replace('.', '/') + ".class";
998 url = ClassLoader.getSystemResource(resourceName + ".class");
1002 logDiagnostic("Class '" + logAdapterClassName + "' [" + resourceName + "] cannot be found.");
1004 logDiagnostic("Class '" + logAdapterClassName + "' was found at '" + url + "'");
1008 Class c = null;
1010 c = Class.forName(logAdapterClassName, true, currentCL);
1024 // Try the class classloader.
1031 c = Class.forName(logAdapterClassName);
1038 + "' is not available via the LogFactoryImpl class classloader: "
1048 // [rather than testing Log.class.isAssignableFrom(c)] so that
1057 // Oops, we have a potential problem here. An adapter class
1085 // with a static variable on the log adapter class has thrown
1153 * is discovered that the classloader which loaded this class is a child
1155 * has been set then the classloader which loaded this class is returned
1158 * The only time when the classloader which loaded this class is a
1167 ClassLoader thisClassLoader = getClassLoader(LogFactoryImpl.class);
1274 * @param logAdapterClassName is the class name of the Log implementation
1307 * specified log adapter class then failed to cast it to a Log object:
1309 * <li>the specific class just doesn't implement the Log interface
1311 * <li> the specified class has bound to a Log class loaded by some other
1318 * @param badClassLoader is the classloader we loaded the problem class from,
1321 * @param badClass is a Class object with the desired name, but which
1327 private void handleFlawedHierarchy(ClassLoader badClassLoader, Class badClass)
1331 String logInterfaceName = Log.class.getName();
1332 Class interfaces[] = badClass.getInterfaces();
1341 // the class does implement an interface called Log, but
1345 ClassLoader logInterfaceClassLoader = getClassLoader(Log.class);
1347 "Class '" + badClass.getName()
1356 + " bad class '" + badClass + "'");
1365 msg.append(Log.class.getName());
1377 msg.append(Log.class.getName());
1382 // this is just a bad adapter class
1386 msg.append("Log class '");
1398 msg.append("[WARNING] Log class '");