public class Instrumenter extends Object
| Constructor and Description |
|---|
Instrumenter(JavaInstrumentationConfig config) |
Instrumenter(Logger log,
JavaInstrumentationConfig config) |
| Modifier and Type | Method and Description |
|---|---|
Clover2Registry |
endInstrumentation() |
Clover2Registry |
endInstrumentation(boolean append) |
protected void |
finishAndApply(InstrumentationSession session) |
JavaInstrumentationConfig |
getConfig() |
InstrumentationSession |
getSession() |
CharSequence |
instrument(File orig,
CharSequence charSequence,
String fileEncoding)
Reads the
charSequence and returns an instrumented version of it. |
File |
instrument(File srcFile,
File destRoot,
String fileEncoding)
reads the srcFile and produces an instrumented version of that file at the package path rooted at destRoot,
creating parent dirs as needed.
|
FileStructureInfo |
instrument(InstrumentationSource in,
Writer out,
String fileEncoding)
registers orig and produces an instrumented version of in to out
|
void |
startInstrumentation() |
void |
startInstrumentation(Clover2Registry reg) |
public Instrumenter(JavaInstrumentationConfig config)
public Instrumenter(Logger log, JavaInstrumentationConfig config)
public JavaInstrumentationConfig getConfig()
public void startInstrumentation()
throws CloverException
CloverExceptionpublic void startInstrumentation(Clover2Registry reg) throws CloverException
CloverExceptionpublic File instrument(@NotNull File srcFile, @NotNull File destRoot, @Nullable String fileEncoding) throws CloverException
srcFile - the file to instrumentdestRoot - the destination root dirfileEncoding - encoding of the file being instrumented, if null then a global setting from the
config.getEncoding() will be usedCloverException - if something goes wrongpublic FileStructureInfo instrument(@NotNull InstrumentationSource in, @NotNull Writer out, @Nullable String fileEncoding) throws clover.antlr.TokenStreamException, IOException, clover.antlr.RecognitionException, CloverException
in - the input file to instrumentout - the destination streamfileEncoding - encoding of the file being instrumented, a null value means undefinedclover.antlr.TokenStreamExceptionIOExceptionclover.antlr.RecognitionExceptionCloverExceptionpublic CharSequence instrument(@NotNull File orig, @NotNull CharSequence charSequence, @Nullable String fileEncoding) throws clover.antlr.TokenStreamException, IOException, clover.antlr.RecognitionException, CloverException
charSequence and returns an instrumented version of it.orig - represents a source file location associated the input charSequencecharSequence - source text to be instrumentedfileEncoding - original file encodng, a null value means undefinedclover.antlr.TokenStreamExceptionIOExceptionclover.antlr.RecognitionExceptionCloverExceptionpublic Clover2Registry endInstrumentation() throws CloverException
CloverExceptionpublic Clover2Registry endInstrumentation(boolean append) throws CloverException
CloverExceptionprotected void finishAndApply(InstrumentationSession session) throws ConcurrentInstrumentationException
public InstrumentationSession getSession()
Copyright © 2024 OpenClover.org. All rights reserved.