SourceFileItem.java revision 398ee59bebad6835dab57b60157eff16d511709e
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.report.internal.html.page;
13
14import org.jacoco.core.analysis.ICoverageNode;
15import org.jacoco.core.analysis.ISourceFileCoverage;
16import org.jacoco.report.internal.ReportOutputFolder;
17import org.jacoco.report.internal.html.resources.Styles;
18import org.jacoco.report.internal.html.table.ITableItem;
19
20/**
21 * Table items representing a source file which cannot be linked.
22 *
23 */
24final class SourceFileItem implements ITableItem {
25
26	private final ICoverageNode node;
27
28	SourceFileItem(final ISourceFileCoverage node) {
29		this.node = node;
30	}
31
32	public String getLinkLabel() {
33		return node.getName();
34	}
35
36	public String getLinkStyle() {
37		return Styles.EL_SOURCE;
38	}
39
40	public String getLink(final ReportOutputFolder base) {
41		return null;
42	}
43
44	public ICoverageNode getNode() {
45		return node;
46	}
47
48}
49