public class SystemPropertiesRuntime extends AbstractRuntime
IRuntime
implementation makes the execution data available
through a special entry in the System.getProperties()
hash table. The
advantage is, that the instrumented classes do not get dependencies to other
classes than the JRE library itself.
This runtime may cause problems in environments with security restrictions,
in applications that replace the system properties or in applications that
fail if non-String values are placed in the system properties.data
Constructor and Description |
---|
SystemPropertiesRuntime()
Creates a new runtime.
|
Modifier and Type | Method and Description |
---|---|
int |
generateDataAccessor(long classid,
String classname,
int probecount,
org.objectweb.asm.MethodVisitor mv)
This method generates the byte code required to obtain the coverage data
structure for the class with the given id.
|
void |
shutdown()
Allows the coverage runtime to cleanup internals.
|
void |
startup(RuntimeData data)
Subclasses must call this method when overwriting it.
|
createRandomId
public int generateDataAccessor(long classid, String classname, int probecount, org.objectweb.asm.MethodVisitor mv)
IExecutionDataAccessorGenerator
boolean[]
instance to the
operand stack. Except this result object the generated code must not make
any assumptions about the structure of the embedding method or class. The
generated code must not use or allocate local variables.classid
- identifier of the classclassname
- VM class nameprobecount
- probe count for this classmv
- code outputpublic void startup(RuntimeData data) throws Exception
AbstractRuntime
startup
in interface IRuntime
startup
in class AbstractRuntime
data
- the execution data for this runtimeException
- any internal problem during startuppublic void shutdown()
IRuntime
Copyright © 2017. All rights reserved.