diff options
Diffstat (limited to 'org.jacoco.core/src/org/jacoco/core/data/ExecutionData.java')
-rw-r--r-- | org.jacoco.core/src/org/jacoco/core/data/ExecutionData.java | 63 |
1 files changed, 32 insertions, 31 deletions
diff --git a/org.jacoco.core/src/org/jacoco/core/data/ExecutionData.java b/org.jacoco.core/src/org/jacoco/core/data/ExecutionData.java index a728e033..a22c0235 100644 --- a/org.jacoco.core/src/org/jacoco/core/data/ExecutionData.java +++ b/org.jacoco.core/src/org/jacoco/core/data/ExecutionData.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.data; @@ -32,7 +33,7 @@ public final class ExecutionData implements IExecutionData { /** * Creates a new {@link ExecutionData} object with the given probe data. - * + * * @param id * class identifier * @param name @@ -50,7 +51,7 @@ public final class ExecutionData implements IExecutionData { /** * Creates a new {@link ExecutionData} object with the given probe data * length. All probes are set to <code>false</code>. - * + * * @param id * class identifier * @param name @@ -58,7 +59,8 @@ public final class ExecutionData implements IExecutionData { * @param probeCount * probe count */ - public ExecutionData(final long id, final String name, final int probeCount) { + public ExecutionData(final long id, final String name, + final int probeCount) { this.id = id; this.name = name; this.probes = new boolean[probeCount]; @@ -67,7 +69,7 @@ public final class ExecutionData implements IExecutionData { /** * Return the unique identifier for this class. The identifier is the CRC64 * checksum of the raw class file definition. - * + * * @return class identifier */ public long getId() { @@ -76,7 +78,7 @@ public final class ExecutionData implements IExecutionData { /** * The VM name of the class. - * + * * @return VM name */ public String getName() { @@ -103,10 +105,9 @@ public final class ExecutionData implements IExecutionData { } /** - * Returns the execution data probe for a given index. A value of - * <code>true</code> indicates that the corresponding probe was - * executed. - * + * Returns the execution data probes. A value of <code>true</code> indicates + * that the corresponding probe was executed. + * * @return probe data */ public boolean getProbe(final int index) { @@ -130,7 +131,7 @@ public final class ExecutionData implements IExecutionData { /** * Checks whether any probe has been hit. - * + * * @return <code>true</code>, if at least one probe has been hit */ public boolean hasHits() { @@ -147,13 +148,13 @@ public final class ExecutionData implements IExecutionData { * a probe entry in this object is marked as executed (<code>true</code>) if * this probe or the corresponding other probe was executed. So the result * is - * + * * <pre> * A or B * </pre> - * + * * The probe array of the other object is not modified. - * + * * @param other * execution data to merge */ @@ -168,19 +169,19 @@ public final class ExecutionData implements IExecutionData { * probe in this object is set to the value of <code>flag</code> if the * corresponding other probe was executed. For <code>flag==true</code> this * corresponds to - * + * * <pre> * A or B * </pre> - * + * * For <code>flag==false</code> this can be considered as a subtraction - * + * * <pre> * A and not B * </pre> - * + * * The probe array of the other object is not modified. - * + * * @param other * execution data to merge * @param flag @@ -203,7 +204,7 @@ public final class ExecutionData implements IExecutionData { * Asserts that this execution data object is compatible with the given * parameters. The purpose of this check is to detect a very unlikely class * id collision. - * + * * @param id * other class id, must be the same * @param name @@ -216,14 +217,14 @@ public final class ExecutionData implements IExecutionData { public void assertCompatibility(final long id, final String name, final int probecount) throws IllegalStateException { if (this.id != id) { - throw new IllegalStateException(format( - "Different ids (%016x and %016x).", Long.valueOf(this.id), - Long.valueOf(id))); + throw new IllegalStateException( + format("Different ids (%016x and %016x).", + Long.valueOf(this.id), Long.valueOf(id))); } if (!this.name.equals(name)) { - throw new IllegalStateException(format( - "Different class names %s and %s for id %016x.", this.name, - name, Long.valueOf(id))); + throw new IllegalStateException( + format("Different class names %s and %s for id %016x.", + this.name, name, Long.valueOf(id))); } if (this.probes.length != probecount) { throw new IllegalStateException(format( |