Package: StandardStateWriter

StandardStateWriter

nameinstructionbranchcomplexitylinemethod
StandardStateWriter(StateObjectFactory)
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%
writeState(State, File)
M: 6 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 2 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 java.io.File;
15: import java.io.IOException;
16:
17: import org.eclipse.osgi.service.resolver.State;
18: import org.eclipse.osgi.service.resolver.StateObjectFactory;
19:
20:
21: /**
22: * Standard implementation of {@link StateWriter}.
23: * <p />
24: *
25: * <strong>Concurrent Semantics</strong><br />
26: *
27: * Thread-safe.
28: *
29: */
30: class StandardStateWriter implements StateWriter {
31:
32: private final StateObjectFactory factory;
33:
34: StandardStateWriter(StateObjectFactory factory) {
35: this.factory = factory;
36: }
37:
38: /**
39: * {@inheritDoc}
40: */
41: public void writeState(State state, File output) throws IOException {
42: this.factory.writeState(state, output);
43: }
44: }