Package jadx.core.deobf
Class NameMapper
java.lang.Object
jadx.core.deobf.NameMapper
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanstatic booleanisPrintableAsciiCodePoint(int c) static booleanisPrintableChar(char c) static booleanisPrintableCodePoint(int codePoint) static booleanisReserved(String str) static booleanstatic booleanstatic booleanisValidIdentifier(String str) static booleanisValidIdentifierPart(int codePoint) static booleanisValidIdentifierStart(int codePoint) static StringremoveInvalidChars(String name, String prefix) Return string with removed invalid chars, seeremoveInvalidCharsMiddle(java.lang.String)static StringReturn modified string with removed: not printable chars (including unicode) chars not valid for java identifier part Note: this 'middle' method must be used with prefixed string: can leave invalid chars for java identifier start (i.e numbers) result not checked for reserved wordsstatic String
-
Field Details
-
VALID_JAVA_IDENTIFIER
-
VALID_JAVA_FULL_IDENTIFIER
-
RESERVED_NAMES
-
-
Constructor Details
-
NameMapper
private NameMapper()
-
-
Method Details
-
isReserved
-
isValidIdentifier
-
isValidFullIdentifier
-
isValidAndPrintable
-
isValidIdentifierStart
public static boolean isValidIdentifierStart(int codePoint) -
isValidIdentifierPart
public static boolean isValidIdentifierPart(int codePoint) -
isPrintableChar
public static boolean isPrintableChar(char c) -
isPrintableAsciiCodePoint
public static boolean isPrintableAsciiCodePoint(int c) -
isPrintableCodePoint
public static boolean isPrintableCodePoint(int codePoint) -
isAllCharsPrintable
-
removeInvalidCharsMiddle
Return modified string with removed:- not printable chars (including unicode)
- chars not valid for java identifier part
- can leave invalid chars for java identifier start (i.e numbers)
- result not checked for reserved words
-
removeInvalidChars
Return string with removed invalid chars, seeremoveInvalidCharsMiddle(java.lang.String)Prepend prefix if first char is not valid as java identifier start char.
-
removeNonPrintableCharacters
-