SimpleRemapper
public abstract class Remapper extends Object
Constructor | Description |
---|---|
Remapper() |
Modifier and Type | Method | Description |
---|---|---|
protected SignatureVisitor |
createRemappingSignatureAdapter(SignatureVisitor signatureVisitor) |
Deprecated.
|
protected SignatureVisitor |
createSignatureRemapper(SignatureVisitor signatureVisitor) |
Constructs a new remapper for signatures.
|
String |
map(String internalName) |
Maps the internal name of a class to its new name.
|
String |
mapDesc(String descriptor) |
Returns the given descriptor, remapped with
map(String) . |
String |
mapFieldName(String owner,
String name,
String descriptor) |
Maps a field name to its new name.
|
String |
mapInvokeDynamicMethodName(String name,
String descriptor) |
Maps an invokedynamic method name to its new name.
|
String |
mapMethodDesc(String methodDescriptor) |
Returns the given method descriptor, with its argument and return type descriptors remapped
with
mapDesc(String) . |
String |
mapMethodName(String owner,
String name,
String descriptor) |
Maps a method name to its new name.
|
String |
mapModuleName(String name) |
Maps a module name to its new name.
|
String |
mapPackageName(String name) |
Maps a package name to its new name.
|
String |
mapSignature(String signature,
boolean typeSignature) |
Returns the given signature, remapped with the
SignatureVisitor returned by createSignatureRemapper(SignatureVisitor) . |
String |
mapType(String internalName) |
Returns the given internal name, remapped with
map(String) . |
String[] |
mapTypes(String[] internalNames) |
Returns the given internal names, remapped with
map(String) . |
Object |
mapValue(Object value) |
Returns the given value, remapped with this remapper.
|
public String mapDesc(String descriptor)
map(String)
.descriptor
- a type descriptor.map(String)
(if the descriptor corresponds to an array or object type, otherwise the
descriptor is returned as is).public String mapType(String internalName)
map(String)
.internalName
- the internal name (or array type descriptor) of some (array) class.map(String)
.public String[] mapTypes(String[] internalNames)
map(String)
.internalNames
- the internal names (or array type descriptors) of some (array) classes.map(String)
.public String mapMethodDesc(String methodDescriptor)
mapDesc(String)
.methodDescriptor
- a method descriptor.mapDesc(String)
.public Object mapValue(Object value)
public String mapSignature(String signature, boolean typeSignature)
SignatureVisitor
returned by createSignatureRemapper(SignatureVisitor)
.signature
- a JavaTypeSignature, ClassSignature or MethodSignature.typeSignature
- whether the given signature is a JavaTypeSignature.SignatureVisitor
returned by
createSignatureRemapper(SignatureVisitor)
.@Deprecated protected SignatureVisitor createRemappingSignatureAdapter(SignatureVisitor signatureVisitor)
SignatureRemapper
.signatureVisitor
- the SignatureVisitor the remapper must delegate to.protected SignatureVisitor createSignatureRemapper(SignatureVisitor signatureVisitor)
SignatureRemapper
.signatureVisitor
- the SignatureVisitor the remapper must delegate to.public String mapMethodName(String owner, String name, String descriptor)
owner
- the internal name of the owner class of the method.name
- the name of the method.descriptor
- the descriptor of the method.public String mapInvokeDynamicMethodName(String name, String descriptor)
name
- the name of the method.descriptor
- the descriptor of the method.public String mapFieldName(String owner, String name, String descriptor)
owner
- the internal name of the owner class of the field.name
- the name of the field.descriptor
- the descriptor of the field.public String mapPackageName(String name)
name
- the fully qualified name of the package (using dots).public String mapModuleName(String name)
name
- the fully qualified name (using dots) of a module.