Package: StandardSystemStateAccessor

StandardSystemStateAccessor

nameinstructionbranchcomplexitylinemethod
StandardSystemStateAccessor(PlatformAdmin)
M: 0 C: 6
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 3
100%
M: 0 C: 1
100%
getSystemState()
M: 5 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.nano.serviceability.dump.internal;
13:
14: import org.eclipse.osgi.internal.baseadaptor.StateManager;
15: import org.eclipse.osgi.service.resolver.PlatformAdmin;
16: import org.eclipse.osgi.service.resolver.State;
17:
18: /**
19: * Standard implementation of {@link SystemStateAccessor}.
20: * <p />
21: *
22: * <strong>Concurrent Semantics</strong><br />
23: *
24: * Thread-safe.
25: *
26: */
27: final class StandardSystemStateAccessor implements SystemStateAccessor {
28:
29: private final PlatformAdmin platformAdmin;
30:
31: StandardSystemStateAccessor(PlatformAdmin platformAdmin) {
32: this.platformAdmin = platformAdmin;
33: }
34:
35: /**
36: * {@inheritDoc}
37: */
38: public State getSystemState() {
39: return ((StateManager)this.platformAdmin).getSystemState();
40: }
41: }