public abstract class Remapper
extends java.lang.Object
Constructor and Description |
---|
Remapper() |
Modifier and Type | Method and Description |
---|---|
protected org.objectweb.asm.signature.SignatureVisitor |
createRemappingSignatureAdapter(org.objectweb.asm.signature.SignatureVisitor signatureVisitor)
Deprecated.
|
protected org.objectweb.asm.signature.SignatureVisitor |
createSignatureRemapper(org.objectweb.asm.signature.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 |
mapInnerClassName(java.lang.String name,
java.lang.String ownerName,
java.lang.String innerName)
Maps an inner class name to its new name.
|
java.lang.String |
mapInvokeDynamicMethodName(java.lang.String name,
java.lang.String descriptor)
Maps an invokedynamic or a constant dynamic 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 |
mapRecordComponentName(java.lang.String owner,
java.lang.String name,
java.lang.String descriptor)
Maps a record component 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) . |
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).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)
Boolean
,
Byte
, Short
, Character
, Integer
, Long
, Double
,
Float
, String
, Type
, Handle
, ConstantDynamic
or arrays
of primitive types .value
- an object. Only Type
, Handle
and ConstantDynamic
values
are remapped.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 org.objectweb.asm.signature.SignatureVisitor createRemappingSignatureAdapter(org.objectweb.asm.signature.SignatureVisitor signatureVisitor)
createSignatureRemapper(org.objectweb.asm.signature.SignatureVisitor)
instead.SignatureRemapper
.signatureVisitor
- the SignatureVisitor the remapper must delegate to.protected org.objectweb.asm.signature.SignatureVisitor createSignatureRemapper(org.objectweb.asm.signature.SignatureVisitor signatureVisitor)
SignatureRemapper
.signatureVisitor
- the SignatureVisitor the remapper must delegate to.public java.lang.String mapInnerClassName(java.lang.String name, java.lang.String ownerName, java.lang.String innerName)
name
- the fully-qualified internal name of the inner class.ownerName
- the internal name of the owner class of the inner class.innerName
- the internal name of the inner class.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 mapRecordComponentName(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 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.