public abstract class Remapper extends 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.
|
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 |
mapInnerClassName(String name,
String ownerName,
String innerName)
Maps an inner class name to its new name.
|
String |
mapInvokeDynamicMethodName(String name,
String descriptor)
Maps an invokedynamic or a constant dynamic 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 |
mapRecordComponentName(String owner,
String name,
String descriptor)
Maps a record component 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)
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 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)
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 String mapInnerClassName(String name, String ownerName, 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 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 mapRecordComponentName(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 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.Copyright © 2023. All rights reserved.