public class NameCodec extends Object
CallSiteDescriptor
objects. Note that you are expected to mangle
individual tokens, and not the whole name at the call site, i.e. the colon character normally separating the tokens
is never mangled. I.e. you wouldn't mangle dyn:getProp:color
into dyn\!getProp\!color
, but you would
mangle dyn:getProp:color$
into dyn:getProp:\=color\%
(only mangling the individual token containing
the symbol color$
). CallSiteDescriptorFactory.tokenizeName(String)
(and by implication, all call site
descriptors it creates) will automatically perform demangling on the passed names. If you use this factory, or you
have your own way of creating call site descriptors, but you still delegate to this method of the default factory
(it is recommended that you do), then you have demangling handled for you already, and only need to ensure that you
mangle the names when you're emitting them in the bytecode.Modifier and Type | Method and Description |
---|---|
static String |
decode(String name)
Decodes ("demangles") an encoded symbolic name.
|
static String |
encode(String name)
Encodes ("mangles") an unencoded symbolic name.
|
Copyright © 2019 Attila Szegedi. All rights reserved.