org.conqat.engine.sourcecode.coverage.CoverageProbeBase Maven / Gradle / Ivy
/*
* Copyright (c) CQSE GmbH
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.conqat.engine.sourcecode.coverage;
import java.io.Serializable;
import org.conqat.lib.commons.js_export.ExportToTypeScript;
import com.fasterxml.jackson.annotation.JsonProperty;
/**
* Base class for coverage probes. Probes are generic coverage "indicators"
* associated with a source line (the start line of the corresponding
* statement). Probes can be of different types. For example in case of branch
* coverage a probe may indicate for an if condition how many times it was
* evaluated to true and how often to false.
*/
@ExportToTypeScript
public abstract class CoverageProbeBase implements Serializable {
private static final long serialVersionUID = 1L;
/** 1-based line number of the associated statement */
@JsonProperty("line")
private int line;
public CoverageProbeBase(int line) {
this.line = line;
}
public int getLine() {
return line;
}
public void setLine(int line) {
this.line = line;
}
/** Returns the number of coverable entities for this probe. */
public abstract int getCoverableCount();
/** Returns the number of covered entities for this probe. */
public abstract int getCoveredCount();
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy