public class Fingerprint extends Object implements AutoCloseable
Modifier and Type | Field and Description |
---|---|
private static int |
BREAKPOINT_EVENT |
private static ThreadLocal<Fingerprint> |
current |
static boolean |
ENABLED
Determines whether fingerprinting is enabled.
|
static String |
ENABLED_PROPERTY_NAME |
private List<String> |
events |
private int |
index |
private static int |
MAX_EVENT_TAIL_IN_ERROR_MESSAGE |
Constructor and Description |
---|
Fingerprint()
Creates an object to record a fingerprint.
|
Fingerprint(Fingerprint toVerifyAgainst)
Creates an object to verify execution matches a given fingerprint.
|
Fingerprint(List<String> toVerifyAgainst)
Creates an object to verify execution matches a given fingerprint.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Finishes fingerprint recording or verification for the current thread.
|
private void |
event(String entry) |
Collection<String> |
getEvents() |
private int |
nextEventId() |
Fingerprint |
open()
Starts fingerprint recording or verification for the current thread.
|
static void |
submit(String format,
Object... args)
Submits an execution event for the purpose of recording or verifying a fingerprint.
|
private String |
tail() |
public static final String ENABLED_PROPERTY_NAME
public static final boolean ENABLED
private static final ThreadLocal<Fingerprint> current
private int index
private static final int BREAKPOINT_EVENT
private static final int MAX_EVENT_TAIL_IN_ERROR_MESSAGE
public Fingerprint()
public Fingerprint(List<String> toVerifyAgainst)
toVerifyAgainst
- the fingerprint events to verify againstpublic Fingerprint(Fingerprint toVerifyAgainst)
toVerifyAgainst
- the fingerprint to verify againstpublic Collection<String> getEvents()
public Fingerprint open()
public void close()
close
in interface AutoCloseable
public static void submit(String format, Object... args)
ENABLED
is true
.private int nextEventId()