public class Mangling
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static boolean |
USE_SYMBOLIC |
Constructor and Description |
---|
Mangling() |
Modifier and Type | Method and Description |
---|---|
static char |
demangle2(char char1,
char char2)
Demangle a three-character mangling starting with '$'.
|
static java.lang.String |
demangleField(java.lang.String name) |
static java.lang.String |
demangleMethod(java.lang.String name) |
static java.lang.String |
demangleName(java.lang.String name,
boolean reversible) |
static java.lang.String |
demangleQualifiedName(java.lang.String name) |
static java.lang.String |
demangleSymbolic(java.lang.String name) |
static java.lang.String |
mangleClassName(java.lang.String name)
Mangle a simple class or package name.
|
static java.lang.String |
mangleField(java.lang.String name) |
static java.lang.String |
mangleMethod(java.lang.String name) |
static java.lang.String |
mangleName(java.lang.String name) |
static java.lang.String |
mangleName(java.lang.String name,
boolean reversible)
Convert a string to a safe Java identifier.
|
static java.lang.String |
mangleNameIfNeeded(java.lang.String name) |
static java.lang.String |
mangleQualifiedName(java.lang.String name)
Mangle a possibly-qualified class name.
|
static java.lang.String |
mangleSymbolic(java.lang.String name,
char context,
boolean force)
Mangle according to John Rose's "Symbolic Freedom in the VM".
|
static java.lang.String |
mangleVariable(java.lang.String name) |
public static final boolean USE_SYMBOLIC
public static java.lang.String mangleClassName(java.lang.String name)
public static java.lang.String mangleQualifiedName(java.lang.String name)
public static java.lang.String mangleVariable(java.lang.String name)
public static java.lang.String mangleField(java.lang.String name)
public static java.lang.String demangleField(java.lang.String name)
public static java.lang.String mangleMethod(java.lang.String name)
public static java.lang.String demangleMethod(java.lang.String name)
public static java.lang.String demangleQualifiedName(java.lang.String name)
public static java.lang.String mangleSymbolic(java.lang.String name, char context, boolean force)
context
- One of 'C' (class name); 'Q' (qualified name, with dots);
'F' (field name); 'M' (method name); 'V' (local variable name).force
- True if should escape '\\' even if that is the
only disallowed character. The may cause an already-mangled name
to be doubly mangled.public static java.lang.String demangleName(java.lang.String name, boolean reversible)
public static char demangle2(char char1, char char2)
public static java.lang.String demangleSymbolic(java.lang.String name)
public static java.lang.String mangleName(java.lang.String name)
public static java.lang.String mangleName(java.lang.String name, boolean reversible)
reversible
- if we should use an invertible mapping.public static java.lang.String mangleNameIfNeeded(java.lang.String name)