string-notation / de.joshuagleitze.stringnotation / JavaPackageName

JavaPackageName

object JavaPackageName : BaseStringNotation

A notation for whole java packages. When printing parts, it will drop any character that is not allowed in a Java identifier. If the result is a Java keyword, _ will be appended to it.

Allowed characters are determined using Character.isJavaIdentifierStart and Character.isJavaIdentifierPart. Keywords are detected using SourceVersion.isKeyword.

Functions

printBeforeInnerPart

Allows to print characters in front of parts that are not the first part. The default implementation prints nothing.

fun printBeforeInnerPart(index: Int, part: String): String

transformPartToPrint

Allows to transform a part before it is being printed. The default implementation does not modify the part in any way.

fun transformPartToPrint(index: Int, part: String): String