Package: ExtendedNoClassDefFoundError

ExtendedNoClassDefFoundError

nameinstructionbranchcomplexitylinemethod
ExtendedNoClassDefFoundError(ClassLoader, NoClassDefFoundError)
M: 27 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 4 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 NoClassDefFoundError} that provides access to the ClassLoader that attempted
16: * the class load.
17: * <p />
18: *
19: * <strong>Concurrent Semantics</strong><br />
20: * <strong>Thread-safe</strong>
21: *
22: */
23: public class ExtendedNoClassDefFoundError extends NoClassDefFoundError {
24:
25: private static final long serialVersionUID = 4573722090207901849L;
26:
27: private final ClassLoader classLoader;
28:
29: public ExtendedNoClassDefFoundError(ClassLoader classLoader, NoClassDefFoundError cause) {
30: super(cause.getMessage() + " in " + classLoader);
31: this.classLoader = classLoader;
32: initCause(cause);
33: }
34:
35: public ClassLoader getClassLoader() {
36: return this.classLoader;
37: }
38: }