Package org.objectweb.asm.commons
Class Remapper
- java.lang.Object
-
- org.objectweb.asm.commons.Remapper
-
- Direct Known Subclasses:
SimpleRemapper
public abstract class Remapper extends Object
A class responsible for remapping types and names. Subclasses can override the following methods:map(String)
- map typemapFieldName(String, String, String)
- map field namemapMethodName(String, String, String)
- map method name
- Author:
- Eugene Kuleshov
-
-
Constructor Summary
Constructors Constructor Description Remapper()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected SignatureVisitor
createRemappingSignatureAdapter(SignatureVisitor v)
Deprecated.protected SignatureVisitor
createSignatureRemapper(SignatureVisitor v)
String
map(String typeName)
Map type name to the new name.String
mapDesc(String desc)
String
mapFieldName(String owner, String name, String desc)
Map field name to the new name.String
mapInvokeDynamicMethodName(String name, String desc)
Map invokedynamic method name to the new name.String
mapMethodDesc(String desc)
String
mapMethodName(String owner, String name, String desc)
Map method name to the new name.String
mapSignature(String signature, boolean typeSignature)
String
mapType(String type)
String[]
mapTypes(String[] types)
Object
mapValue(Object value)
-
-
-
Method Detail
-
mapSignature
public String mapSignature(String signature, boolean typeSignature)
- Parameters:
signature
- signature for mappertypeSignature
- true if signature is a FieldTypeSignature, such as the signature parameter of the ClassVisitor.visitField or MethodVisitor.visitLocalVariable methods- Returns:
- signature rewritten as a string
-
createRemappingSignatureAdapter
@Deprecated protected SignatureVisitor createRemappingSignatureAdapter(SignatureVisitor v)
Deprecated.
-
createSignatureRemapper
protected SignatureVisitor createSignatureRemapper(SignatureVisitor v)
-
mapMethodName
public String mapMethodName(String owner, String name, String desc)
Map method name to the new name. Subclasses can override.- Parameters:
owner
- owner of the method.name
- name of the method.desc
- descriptor of the method.- Returns:
- new name of the method
-
mapInvokeDynamicMethodName
public String mapInvokeDynamicMethodName(String name, String desc)
Map invokedynamic method name to the new name. Subclasses can override.- Parameters:
name
- name of the invokedynamic.desc
- descriptor of the invokedynamic.- Returns:
- new invokdynamic name.
-
mapFieldName
public String mapFieldName(String owner, String name, String desc)
Map field name to the new name. Subclasses can override.- Parameters:
owner
- owner of the field.name
- name of the fielddesc
- descriptor of the field- Returns:
- new name of the field.
-
-