Package software.amazon.smithy.utils
Class CodeWriterDebugInfo
java.lang.Object
software.amazon.smithy.utils.CodeWriterDebugInfo
Provides debug information about the current state of a CodeWriter.
 
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.
- 
Method SummaryModifier and TypeMethodDescriptiongetMetadata(String key) Gets debug metadata by name.Get the CodeWriter state path from which the debug information was collected.voidputMetadata(String key, String value) Put additional debug metadata on the object.toString()Returns a string representation that can be used in exception messages and when debugging.
- 
Method Details- 
getStateDebugPathGet the CodeWriter state path from which the debug information was collected.- Returns:
- Returns the path as returned by AbstractCodeWriter.getStateDebugPath();
 
- 
putMetadataPut additional debug metadata on the object.- Parameters:
- key- Name of the value to set.
- value- Value to set that cannot be null.
 
- 
getMetadataGets debug metadata by name.- Parameters:
- key- Value to retrieve.
- Returns:
- Returns the string value or null if not found.
 
- 
toStringReturns a string representation that can be used in exception messages and when debugging.
 
-