Package: ExtendedClassNotFoundException

ExtendedClassNotFoundException

nameinstructionbranchcomplexitylinemethod
ExtendedClassNotFoundException(ClassLoader, ClassNotFoundException)
M: 24 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 3 C: 0
0%
M: 1 C: 0
0%
getClassLoader()
M: 9 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%

Coverage

1: /*******************************************************************************
2: * Copyright (c) 2008, 2010 VMware Inc.
3: * All rights reserved. This program and the accompanying materials
4: * are made available under the terms of the Eclipse Public License v1.0
5: * which accompanies this distribution, and is available at
6: * http://www.eclipse.org/legal/epl-v10.html
7: *
8: * Contributors:
9: * VMware Inc. - initial contribution
10: *******************************************************************************/
11:
12: package org.eclipse.virgo.kernel.osgi.framework;
13:
14: /**
15: * An extension to {@link ClassNotFoundException} that provides access to the ClassLoader that
16: * attempted the class load.
17: * <p />
18: *
19: * <strong>Concurrent Semantics</strong><br />
20: * <strong>Thread-safe</strong>
21: *
22: */
23: public class ExtendedClassNotFoundException extends ClassNotFoundException {
24:
25: private static final long serialVersionUID = 6045566593339869456L;
26:
27: // Do not attempt to serialise the class loader as it is probably not serialisable.
28: private final transient ClassLoader classLoader;
29:
30: public ExtendedClassNotFoundException(ClassLoader classLoader, ClassNotFoundException cause) {
31: super(cause.getMessage() + " in " + classLoader, cause);
32: this.classLoader = classLoader;
33: }
34:
35: public ClassLoader getClassLoader() {
36: return this.classLoader;
37: }
38: }