-
Notifications
You must be signed in to change notification settings - Fork 15
API
The two main classes of the flacoco API are Flacoco
and FlacocoAPI
.
This class serves as the main entry point of flacoco. Currently, it supports two output formats:
The default mode returns a mapping between a string representation of a source code line (e.g. fr/spoonlabs/FLtest1/Calculator@-@14
, where fr.spoonlabs.FLtest1.Calculator
is the fully-qualified class name and 14
is the line number), and a Suspiciousness
object that contains all the relevant information regarding the suspiciousness of a line.
Flacoco flacoco = new Flacoco();
Map<String, Suspiciousness> resultDefault = flacoco.runDefault();
The Spoon mode returns the same mapping but from a CtStatement
. More information on how source code lines are mapped to CtStatement
s can be found under SpoonConverter.
Flacoco flacoco = new Flacoco();
Map<CtStatement, Suspiciousness> resultSpoon = flacoco.runSpoon();
This class serves as the configuration manager of the flacoco API. Through it, you can set all the options that will be used during the execution of flacoco. A comprehensive list of options will be provided soon in this page.