public final class CodeWriterDebugInfo
extends java.lang.Object
The primary use case of this class is to be included in things like
exception messages thrown by CodeWriter
. Additional metadata
can be appended to the debug info by calling putMetadata(java.lang.String, java.lang.String)
,
and this metadata will appear when toString()
is called.
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getMetadata(java.lang.String key)
Gets debug metadata by name.
|
java.lang.String |
getStateDebugPath()
Get the CodeWriter state path from which the debug information was collected.
|
void |
putMetadata(java.lang.String key,
java.lang.String value)
Put additional debug metadata on the object.
|
java.lang.String |
toString()
Returns a string representation that can be used in exception
messages and when debugging.
|
public java.lang.String getStateDebugPath()
AbstractCodeWriter.getStateDebugPath()
;public void putMetadata(java.lang.String key, java.lang.String value)
key
- Name of the value to set.value
- Value to set that cannot be null.public java.lang.String getMetadata(java.lang.String key)
key
- Value to retrieve.public java.lang.String toString()
toString
in class java.lang.Object