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