1/*******************************************************************************
2 * Copyright (c) 2009, 2015 Mountainminds GmbH & Co. KG and Contributors
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 *    Marc R. Hoffmann - initial API and implementation
10 *
11 *******************************************************************************/
12package org.jacoco.core.internal.analysis;
13
14import org.jacoco.core.analysis.ISourceFileCoverage;
15
16/**
17 * Implementation of {@link ISourceFileCoverage}.
18 */
19public class SourceFileCoverageImpl extends SourceNodeImpl implements
20		ISourceFileCoverage {
21
22	private final String packagename;
23
24	/**
25	 * Creates a source file data object with the given parameters.
26	 *
27	 * @param name
28	 *            name of the source file
29	 * @param packagename
30	 *            vm name of the package the source file belongs to
31	 */
32	public SourceFileCoverageImpl(final String name, final String packagename) {
33		super(ElementType.SOURCEFILE, name);
34		this.packagename = packagename;
35	}
36
37	// === ISourceFileCoverage implementation ===
38
39	public String getPackageName() {
40		return packagename;
41	}
42
43}
44