asString method
Implementation
String asString(TracingIdRepresentation representation) {
switch (representation) {
case TracingIdRepresentation.decimal:
return value.toString();
case TracingIdRepresentation.lowDecimal:
return (value & lowTraceMask).toString();
case TracingIdRepresentation.hex:
return value.toRadixString(16);
case TracingIdRepresentation.hex16Chars:
return (value & lowTraceMask).toRadixString(16).padLeft(16, '0');
case TracingIdRepresentation.highHex16Chars:
return (value >> 64).toRadixString(16).padLeft(16, '0');
case TracingIdRepresentation.hex32Chars:
return value.toRadixString(16).padLeft(32, '0');
}
}