aboutsummaryrefslogtreecommitdiff
path: root/org.jacoco.core/src/org/jacoco/core/analysis
diff options
context:
space:
mode:
Diffstat (limited to 'org.jacoco.core/src/org/jacoco/core/analysis')
-rw-r--r--org.jacoco.core/src/org/jacoco/core/analysis/Analyzer.java27
-rw-r--r--org.jacoco.core/src/org/jacoco/core/analysis/CounterComparator.java17
-rw-r--r--org.jacoco.core/src/org/jacoco/core/analysis/CoverageBuilder.java25
-rw-r--r--org.jacoco.core/src/org/jacoco/core/analysis/CoverageNodeImpl.java27
-rw-r--r--org.jacoco.core/src/org/jacoco/core/analysis/IBundleCoverage.java17
-rw-r--r--org.jacoco.core/src/org/jacoco/core/analysis/IClassCoverage.java31
-rw-r--r--org.jacoco.core/src/org/jacoco/core/analysis/ICounter.java29
-rw-r--r--org.jacoco.core/src/org/jacoco/core/analysis/ICoverageNode.java36
-rw-r--r--org.jacoco.core/src/org/jacoco/core/analysis/ICoverageVisitor.java15
-rw-r--r--org.jacoco.core/src/org/jacoco/core/analysis/ILine.java21
-rw-r--r--org.jacoco.core/src/org/jacoco/core/analysis/IMethodCoverage.java17
-rw-r--r--org.jacoco.core/src/org/jacoco/core/analysis/IPackageCoverage.java19
-rw-r--r--org.jacoco.core/src/org/jacoco/core/analysis/ISourceFileCoverage.java15
-rw-r--r--org.jacoco.core/src/org/jacoco/core/analysis/ISourceNode.java19
-rw-r--r--org.jacoco.core/src/org/jacoco/core/analysis/NodeComparator.java24
-rw-r--r--org.jacoco.core/src/org/jacoco/core/analysis/package-info.java18
16 files changed, 187 insertions, 170 deletions
diff --git a/org.jacoco.core/src/org/jacoco/core/analysis/Analyzer.java b/org.jacoco.core/src/org/jacoco/core/analysis/Analyzer.java
index 7759b89d..b3a34d25 100644
--- a/org.jacoco.core/src/org/jacoco/core/analysis/Analyzer.java
+++ b/org.jacoco.core/src/org/jacoco/core/analysis/Analyzer.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.analysis;
@@ -53,7 +54,7 @@ public class Analyzer {
/**
* Creates a new analyzer reporting to the given output.
- *
+ *
* @param executionData
* execution data
* @param coverageVisitor
@@ -69,7 +70,7 @@ public class Analyzer {
/**
* Creates an ASM class visitor for analysis.
- *
+ *
* @param classid
* id of the class calculated with {@link CRC64}
* @param className
@@ -119,7 +120,7 @@ public class Analyzer {
/**
* Analyzes the class definition from a given in-memory buffer.
- *
+ *
* @param buffer
* class definitions
* @param location
@@ -139,7 +140,7 @@ public class Analyzer {
/**
* Analyzes the class definition from a given input stream. The provided
* {@link InputStream} is not closed by this method.
- *
+ *
* @param input
* stream to read class definition from
* @param location
@@ -172,7 +173,7 @@ public class Analyzer {
* archive or a gzip stream that is searched recursively for class files.
* All other content types are ignored. The provided {@link InputStream} is
* not closed by this method.
- *
+ *
* @param input
* input data
* @param location
@@ -208,7 +209,7 @@ public class Analyzer {
* Analyzes all class files contained in the given file or folder. Class
* files as well as ZIP files are considered. Folders are searched
* recursively.
- *
+ *
* @param file
* file or folder to look for class files
* @return number of class files found
@@ -235,7 +236,7 @@ public class Analyzer {
/**
* Analyzes all classes from the given class path. Directories containing
* class files as well as archive files are considered.
- *
+ *
* @param path
* path definition
* @param basedir
diff --git a/org.jacoco.core/src/org/jacoco/core/analysis/CounterComparator.java b/org.jacoco.core/src/org/jacoco/core/analysis/CounterComparator.java
index 8a67b970..6fe69c6c 100644
--- a/org.jacoco.core/src/org/jacoco/core/analysis/CounterComparator.java
+++ b/org.jacoco.core/src/org/jacoco/core/analysis/CounterComparator.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.analysis;
@@ -74,7 +75,7 @@ public class CounterComparator implements Comparator<ICounter>, Serializable {
/**
* Creates a new version of this comparator that sorts in reverse order.
- *
+ *
* @return reverse comparator
*/
public CounterComparator reverse() {
@@ -84,7 +85,7 @@ public class CounterComparator implements Comparator<ICounter>, Serializable {
/**
* Creates a new comparator for {@link ICoverageNode} counters of the given
* entity based on this counter sorting criteria.
- *
+ *
* @param entity
* counter entity to sort on
* @return comparator for {@link ICoverageNode} elements
diff --git a/org.jacoco.core/src/org/jacoco/core/analysis/CoverageBuilder.java b/org.jacoco.core/src/org/jacoco/core/analysis/CoverageBuilder.java
index 784fbd82..2f99f0b1 100644
--- a/org.jacoco.core/src/org/jacoco/core/analysis/CoverageBuilder.java
+++ b/org.jacoco.core/src/org/jacoco/core/analysis/CoverageBuilder.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.analysis;
@@ -26,7 +27,7 @@ import org.jacoco.core.internal.analysis.SourceFileCoverageImpl;
* {@link ICoverageVisitor} interface. Afterwards the aggregated data can be
* obtained with {@link #getClasses()}, {@link #getSourceFiles()} or
* {@link #getBundle(String)} in the following hierarchy:
- *
+ *
* <pre>
* {@link IBundleCoverage}
* +-- {@link IPackageCoverage}*
@@ -42,7 +43,7 @@ public class CoverageBuilder implements ICoverageVisitor {
/**
* Create a new builder.
- *
+ *
*/
public CoverageBuilder() {
this.classes = new HashMap<String, IClassCoverage>();
@@ -51,7 +52,7 @@ public class CoverageBuilder implements ICoverageVisitor {
/**
* Returns all class nodes currently contained in this builder.
- *
+ *
* @return all class nodes
*/
public Collection<IClassCoverage> getClasses() {
@@ -60,7 +61,7 @@ public class CoverageBuilder implements ICoverageVisitor {
/**
* Returns all source file nodes currently contained in this builder.
- *
+ *
* @return all source file nodes
*/
public Collection<ISourceFileCoverage> getSourceFiles() {
@@ -69,7 +70,7 @@ public class CoverageBuilder implements ICoverageVisitor {
/**
* Creates a bundle from all nodes currently contained in this bundle.
- *
+ *
* @param name
* Name of the bundle
* @return bundle containing all classes and source files
@@ -81,7 +82,7 @@ public class CoverageBuilder implements ICoverageVisitor {
/**
* Returns all classes for which execution data does not match.
- *
+ *
* @see IClassCoverage#isNoMatch()
* @return collection of classes with non-matching execution data
*/
diff --git a/org.jacoco.core/src/org/jacoco/core/analysis/CoverageNodeImpl.java b/org.jacoco.core/src/org/jacoco/core/analysis/CoverageNodeImpl.java
index 6be3bb6f..db8045be 100644
--- a/org.jacoco.core/src/org/jacoco/core/analysis/CoverageNodeImpl.java
+++ b/org.jacoco.core/src/org/jacoco/core/analysis/CoverageNodeImpl.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.analysis;
@@ -44,7 +45,7 @@ public class CoverageNodeImpl implements ICoverageNode {
/**
* Creates a new coverage data node.
- *
+ *
* @param elementType
* type of the element represented by this instance
* @param name
@@ -63,17 +64,17 @@ public class CoverageNodeImpl implements ICoverageNode {
/**
* Increments the counters by the values given by another element.
- *
+ *
* @param child
* counters to add
*/
public void increment(final ICoverageNode child) {
- instructionCounter = instructionCounter.increment(child
- .getInstructionCounter());
+ instructionCounter = instructionCounter
+ .increment(child.getInstructionCounter());
branchCounter = branchCounter.increment(child.getBranchCounter());
lineCounter = lineCounter.increment(child.getLineCounter());
- complexityCounter = complexityCounter.increment(child
- .getComplexityCounter());
+ complexityCounter = complexityCounter
+ .increment(child.getComplexityCounter());
methodCounter = methodCounter.increment(child.getMethodCounter());
classCounter = classCounter.increment(child.getClassCounter());
}
@@ -81,7 +82,7 @@ public class CoverageNodeImpl implements ICoverageNode {
/**
* Increments the counters by the values given by the collection of
* elements.
- *
+ *
* @param children
* list of nodes, which counters will be added to this node
*/
diff --git a/org.jacoco.core/src/org/jacoco/core/analysis/IBundleCoverage.java b/org.jacoco.core/src/org/jacoco/core/analysis/IBundleCoverage.java
index d488f475..aa23a95c 100644
--- a/org.jacoco.core/src/org/jacoco/core/analysis/IBundleCoverage.java
+++ b/org.jacoco.core/src/org/jacoco/core/analysis/IBundleCoverage.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.analysis;
@@ -15,14 +16,14 @@ import java.util.Collection;
/**
* Coverage data of a bundle. A bundle groups a collection of packages.
- *
+ *
* @see IPackageCoverage
*/
public interface IBundleCoverage extends ICoverageNode {
/**
* Returns all packages contained in this bundle.
- *
+ *
* @return all packages
*/
Collection<IPackageCoverage> getPackages();
diff --git a/org.jacoco.core/src/org/jacoco/core/analysis/IClassCoverage.java b/org.jacoco.core/src/org/jacoco/core/analysis/IClassCoverage.java
index 81cc6fe7..071c7c07 100644
--- a/org.jacoco.core/src/org/jacoco/core/analysis/IClassCoverage.java
+++ b/org.jacoco.core/src/org/jacoco/core/analysis/IClassCoverage.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.analysis;
@@ -16,7 +17,7 @@ import java.util.Collection;
/**
* Coverage data of a single class containing methods. The name of this node is
* the fully qualified class name in VM notation (slash separated).
- *
+ *
* @see IMethodCoverage
*/
public interface IClassCoverage extends ISourceNode {
@@ -24,7 +25,7 @@ public interface IClassCoverage extends ISourceNode {
/**
* Returns the identifier for this class which is the CRC64 signature of the
* class definition.
- *
+ *
* @return class identifier
*/
long getId();
@@ -33,7 +34,7 @@ public interface IClassCoverage extends ISourceNode {
* Returns if the the analyzed class does match the execution data provided.
* More precisely if execution data is available for a class with the same
* qualified name but with a different class id.
- *
+ *
* @return <code>true</code> if this class does not match to the provided
* execution data.
*/
@@ -41,14 +42,14 @@ public interface IClassCoverage extends ISourceNode {
/**
* Returns the VM signature of the class.
- *
+ *
* @return VM signature of the class (may be <code>null</code>)
*/
String getSignature();
/**
* Returns the VM name of the superclass.
- *
+ *
* @return VM name of the super class (may be <code>null</code>, i.e.
* <code>java/lang/Object</code>)
*/
@@ -56,28 +57,28 @@ public interface IClassCoverage extends ISourceNode {
/**
* Returns the VM names of implemented/extended interfaces.
- *
+ *
* @return VM names of implemented/extended interfaces
*/
String[] getInterfaceNames();
/**
* Returns the VM name of the package this class belongs to.
- *
+ *
* @return VM name of the package
*/
String getPackageName();
/**
* Returns the optional name of the corresponding source file.
- *
+ *
* @return name of the corresponding source file
*/
String getSourceFileName();
/**
* Returns the methods included in this class.
- *
+ *
* @return methods of this class
*/
Collection<IMethodCoverage> getMethods();
diff --git a/org.jacoco.core/src/org/jacoco/core/analysis/ICounter.java b/org.jacoco.core/src/org/jacoco/core/analysis/ICounter.java
index 60c8dcc5..f7e6adb0 100644
--- a/org.jacoco.core/src/org/jacoco/core/analysis/ICounter.java
+++ b/org.jacoco.core/src/org/jacoco/core/analysis/ICounter.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.analysis;
@@ -60,7 +61,7 @@ public interface ICounter {
/**
* Returns the counter value of the given type.
- *
+ *
* @param value
* value type to return
* @return counter value
@@ -69,21 +70,21 @@ public interface ICounter {
/**
* Returns the total count of items.
- *
+ *
* @return total count of items
*/
int getTotalCount();
/**
* Returns the count of covered items.
- *
+ *
* @return count of covered items
*/
int getCoveredCount();
/**
* Returns the count of missed items.
- *
+ *
* @return count of missed items
*/
int getMissedCount();
@@ -91,7 +92,7 @@ public interface ICounter {
/**
* Calculates the ratio of covered to total count items. If total count
* items is 0 this method returns NaN.
- *
+ *
* @return ratio of covered to total count items
*/
double getCoveredRatio();
@@ -99,19 +100,19 @@ public interface ICounter {
/**
* Calculates the ratio of missed to total count items. If total count items
* is 0 this method returns NaN.
- *
+ *
* @return ratio of missed to total count items
*/
double getMissedRatio();
/**
* Returns the coverage status of this counter.
- *
+ *
* @see ICounter#EMPTY
* @see ICounter#NOT_COVERED
* @see ICounter#PARTLY_COVERED
* @see ICounter#FULLY_COVERED
- *
+ *
* @return status of this line
*/
int getStatus();
diff --git a/org.jacoco.core/src/org/jacoco/core/analysis/ICoverageNode.java b/org.jacoco.core/src/org/jacoco/core/analysis/ICoverageNode.java
index 20b107d4..ddb765a3 100644
--- a/org.jacoco.core/src/org/jacoco/core/analysis/ICoverageNode.java
+++ b/org.jacoco.core/src/org/jacoco/core/analysis/ICoverageNode.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.analysis;
@@ -68,63 +69,63 @@ public interface ICoverageNode {
/**
* Returns the type of element represented by this node.
- *
+ *
* @return type of this node
*/
ElementType getElementType();
/**
* Returns the name of this node.
- *
+ *
* @return name of this node
*/
String getName();
/**
* Returns the counter for byte code instructions.
- *
+ *
* @return counter for instructions
*/
ICounter getInstructionCounter();
/**
* Returns the counter for branches.
- *
+ *
* @return counter for branches
*/
ICounter getBranchCounter();
/**
* Returns the counter for lines.
- *
+ *
* @return counter for lines
*/
ICounter getLineCounter();
/**
* Returns the counter for cyclomatic complexity.
- *
+ *
* @return counter for complexity
*/
ICounter getComplexityCounter();
/**
* Returns the counter for methods.
- *
+ *
* @return counter for methods
*/
ICounter getMethodCounter();
/**
* Returns the counter for classes.
- *
+ *
* @return counter for classes
*/
ICounter getClassCounter();
/**
* Generic access to the the counters.
- *
+ *
* @param entity
* entity we're we want to have the counter for
* @return counter for the given entity
@@ -134,7 +135,8 @@ public interface ICoverageNode {
/**
* Checks whether this node contains code relevant for code coverage.
*
- * @return <code>true</code> if this node contains code relevant for code coverage
+ * @return <code>true</code> if this node contains code relevant for code
+ * coverage
*/
boolean containsCode();
@@ -143,7 +145,7 @@ public interface ICoverageNode {
* implementations may contain heavy data structures, the copy returned by
* this method is reduced to the counters only. This helps to save memory
* while processing huge structures.
- *
+ *
* @return copy with counters only
*/
ICoverageNode getPlainCopy();
diff --git a/org.jacoco.core/src/org/jacoco/core/analysis/ICoverageVisitor.java b/org.jacoco.core/src/org/jacoco/core/analysis/ICoverageVisitor.java
index 3f702906..06fe9b7e 100644
--- a/org.jacoco.core/src/org/jacoco/core/analysis/ICoverageVisitor.java
+++ b/org.jacoco.core/src/org/jacoco/core/analysis/ICoverageVisitor.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.analysis;
@@ -19,7 +20,7 @@ public interface ICoverageVisitor {
/**
* For analyzed class coverage data is emitted to this method.
- *
+ *
* @param coverage
* coverage data for a class
*/
diff --git a/org.jacoco.core/src/org/jacoco/core/analysis/ILine.java b/org.jacoco.core/src/org/jacoco/core/analysis/ILine.java
index ef65dc0d..37a07240 100644
--- a/org.jacoco.core/src/org/jacoco/core/analysis/ILine.java
+++ b/org.jacoco.core/src/org/jacoco/core/analysis/ILine.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.analysis;
@@ -19,14 +20,14 @@ public interface ILine {
/**
* Returns the instruction counter for this line.
- *
+ *
* @return instruction counter
*/
ICounter getInstructionCounter();
/**
* Returns the branches counter for this line.
- *
+ *
* @return branches counter
*/
ICounter getBranchCounter();
@@ -34,12 +35,12 @@ public interface ILine {
/**
* Returns the coverage status of this line, calculated from the
* instructions counter and branch counter.
- *
+ *
* @see ICounter#EMPTY
* @see ICounter#NOT_COVERED
* @see ICounter#PARTLY_COVERED
* @see ICounter#FULLY_COVERED
- *
+ *
* @return status of this line
*/
int getStatus();
diff --git a/org.jacoco.core/src/org/jacoco/core/analysis/IMethodCoverage.java b/org.jacoco.core/src/org/jacoco/core/analysis/IMethodCoverage.java
index b6755170..1e278878 100644
--- a/org.jacoco.core/src/org/jacoco/core/analysis/IMethodCoverage.java
+++ b/org.jacoco.core/src/org/jacoco/core/analysis/IMethodCoverage.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.analysis;
@@ -19,14 +20,14 @@ public interface IMethodCoverage extends ISourceNode {
/**
* Returns the descriptor of the method.
- *
+ *
* @return descriptor
*/
String getDesc();
/**
* Returns the generic signature of the method if defined.
- *
+ *
* @return generic signature or <code>null</code>
*/
String getSignature();
diff --git a/org.jacoco.core/src/org/jacoco/core/analysis/IPackageCoverage.java b/org.jacoco.core/src/org/jacoco/core/analysis/IPackageCoverage.java
index 32121620..b4c56a4a 100644
--- a/org.jacoco.core/src/org/jacoco/core/analysis/IPackageCoverage.java
+++ b/org.jacoco.core/src/org/jacoco/core/analysis/IPackageCoverage.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.analysis;
@@ -17,7 +18,7 @@ import java.util.Collection;
* Coverage data of a Java package containing classes and source files. The name
* of this node is the package name in VM notation (slash separated). The name
* of the default package is the empty string.
- *
+ *
* @see IClassCoverage
* @see ISourceFileCoverage
*/
@@ -25,14 +26,14 @@ public interface IPackageCoverage extends ICoverageNode {
/**
* Returns all classes contained in this package.
- *
+ *
* @return all classes
*/
Collection<IClassCoverage> getClasses();
/**
* Returns all source files in this package.
- *
+ *
* @return all source files
*/
Collection<ISourceFileCoverage> getSourceFiles();
diff --git a/org.jacoco.core/src/org/jacoco/core/analysis/ISourceFileCoverage.java b/org.jacoco.core/src/org/jacoco/core/analysis/ISourceFileCoverage.java
index 5f01160a..67dfa0d8 100644
--- a/org.jacoco.core/src/org/jacoco/core/analysis/ISourceFileCoverage.java
+++ b/org.jacoco.core/src/org/jacoco/core/analysis/ISourceFileCoverage.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.analysis;
@@ -19,7 +20,7 @@ public interface ISourceFileCoverage extends ISourceNode {
/**
* Returns the VM name of the package the source file belongs to.
- *
+ *
* @return package name
*/
String getPackageName();
diff --git a/org.jacoco.core/src/org/jacoco/core/analysis/ISourceNode.java b/org.jacoco.core/src/org/jacoco/core/analysis/ISourceNode.java
index d64b2cc1..8fd26fe1 100644
--- a/org.jacoco.core/src/org/jacoco/core/analysis/ISourceNode.java
+++ b/org.jacoco.core/src/org/jacoco/core/analysis/ISourceNode.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.analysis;
@@ -23,7 +24,7 @@ public interface ISourceNode extends ICoverageNode {
/**
* The number of the first line coverage information is available for. If no
* line is contained, the method returns -1.
- *
+ *
* @return number of the first line or {@link #UNKNOWN_LINE}
*/
int getFirstLine();
@@ -31,14 +32,14 @@ public interface ISourceNode extends ICoverageNode {
/**
* The number of the last line coverage information is available for. If no
* line is contained, the method returns -1.
- *
+ *
* @return number of the last line or {@link #UNKNOWN_LINE}
*/
int getLastLine();
/**
* Returns the line information for given line.
- *
+ *
* @param nr
* line number of interest
* @return line information
diff --git a/org.jacoco.core/src/org/jacoco/core/analysis/NodeComparator.java b/org.jacoco.core/src/org/jacoco/core/analysis/NodeComparator.java
index 3fea25fb..85058f93 100644
--- a/org.jacoco.core/src/org/jacoco/core/analysis/NodeComparator.java
+++ b/org.jacoco.core/src/org/jacoco/core/analysis/NodeComparator.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.analysis;
@@ -23,7 +24,7 @@ import org.jacoco.core.analysis.ICoverageNode.CounterEntity;
/**
* Comparator to compare {@link ICoverageNode} objects by different counter
* criteria.
- *
+ *
* @see CounterComparator#on(ICoverageNode.CounterEntity)
*/
public class NodeComparator implements Comparator<ICoverageNode>, Serializable {
@@ -42,10 +43,10 @@ public class NodeComparator implements Comparator<ICoverageNode>, Serializable {
/**
* Creates a new composite comparator with a second search criterion.
- *
+ *
* @param second
* second criterion comparator
- *
+ *
* @return composite comparator
*/
public NodeComparator second(final Comparator<ICoverageNode> second) {
@@ -65,14 +66,15 @@ public class NodeComparator implements Comparator<ICoverageNode>, Serializable {
/**
* Returns a sorted copy of the given collection of {@link ICoverageNode}
* elements.
- *
+ *
* @param <T>
* actual type of the elements
* @param summaries
* collection to create a copy of
* @return sorted copy
*/
- public <T extends ICoverageNode> List<T> sort(final Collection<T> summaries) {
+ public <T extends ICoverageNode> List<T> sort(
+ final Collection<T> summaries) {
final List<T> result = new ArrayList<T>(summaries);
Collections.sort(result, this);
return result;
diff --git a/org.jacoco.core/src/org/jacoco/core/analysis/package-info.java b/org.jacoco.core/src/org/jacoco/core/analysis/package-info.java
index d1a5e73b..4f83a0c4 100644
--- a/org.jacoco.core/src/org/jacoco/core/analysis/package-info.java
+++ b/org.jacoco.core/src/org/jacoco/core/analysis/package-info.java
@@ -1,22 +1,22 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
/**
* <p>
* Coverage calculation and analysis. The coverage information is calculated
* with an {@link org.jacoco.core.analysis.Analyzer} instance from class files
- * (target) and
- * {@linkplain org.jacoco.core.data.IExecutionDataVisitor execution data}
- * (actual).
+ * (target) and {@linkplain org.jacoco.core.data.IExecutionDataVisitor execution
+ * data} (actual).
* </p>
*
* <p>