TomlInteger

@SerialInfo
@Target(allowedTargets = [AnnotationTarget.PROPERTY])
annotation class TomlInteger(val base: TomlInteger.Base = Dec, val group: Int = 0)(source)

Changes the representation of the annotated Byte, Short, Int, Long property.

class ByteCode(
@TomlInteger(
base = TomlInteger.Base.Hex,
group = 2
)
val code: Int
)
ByteCode(0xFFE490)

will produce:

code = 0xFF_E4_90

Types

Link copied to clipboard

The base of the integer.

Properties

Link copied to clipboard
Link copied to clipboard
val group: Int = 0

the size of a digit group separated by '_'. If set to 0, the digits will not be grouped.