Package org.jacoco.report.internal
Class NormalizedFileNames
- java.lang.Object
-
- org.jacoco.report.internal.NormalizedFileNames
-
class NormalizedFileNames extends java.lang.Object
Internal utility to create normalized file names from string ids. The file names generated by an instance of this class have the following properties:- The same input id is mapped to the same file name.
- Different ids are mapped to different file names.
- For safe characters the file name corresponds to the input id, other
characters are replaced by
_
(underscore). - File names are case aware, i.e. the same file name but with different upper/lower case characters is not possible.
- If unique filenames can't directly created from the ids, additional suffixes are appended.
-
-
Field Summary
Fields Modifier and Type Field Description private static java.util.BitSet
LEGAL_CHARS
private java.util.Map<java.lang.String,java.lang.String>
mapping
private java.util.Set<java.lang.String>
usedNames
-
Constructor Summary
Constructors Constructor Description NormalizedFileNames()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private java.lang.String
ensureUniqueness(java.lang.String s)
java.lang.String
getFileName(java.lang.String id)
private java.lang.String
replaceIllegalChars(java.lang.String s)
-