org.mvel2.asm.commons
Class Remapper

java.lang.Object
  extended by org.mvel2.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:

Author:
Eugene Kuleshov

Constructor Summary
Remapper()
           
 
Method Summary
protected  SignatureVisitor createRemappingSignatureAdapter(SignatureVisitor v)
          Deprecated. use createSignatureRemapper(org.mvel2.asm.signature.SignatureVisitor) instead.
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 mapModuleName(String name)
          Map module name to the new name.
 String mapPackageName(String name)
          Map package name to the new name.
 String mapSignature(String signature, boolean typeSignature)
           
 String mapType(String type)
           
 String[] mapTypes(String[] types)
           
 Object mapValue(Object value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Remapper

public Remapper()
Method Detail

mapDesc

public String mapDesc(String desc)

mapType

public String mapType(String type)

mapTypes

public String[] mapTypes(String[] types)

mapMethodDesc

public String mapMethodDesc(String desc)

mapValue

public Object mapValue(Object value)

mapSignature

public String mapSignature(String signature,
                           boolean typeSignature)
Parameters:
signature - signature for mapper
typeSignature - 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. use createSignatureRemapper(org.mvel2.asm.signature.SignatureVisitor) instead.


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 field
desc - descriptor of the field
Returns:
new name of the field.

mapPackageName

public String mapPackageName(String name)
Map package name to the new name. Subclasses can override.

Parameters:
name - name of the package
Returns:
new name of the package

mapModuleName

public String mapModuleName(String name)
Map module name to the new name. Subclasses can override.

Parameters:
name - name of the module
Returns:
new name of the module

map

public String map(String typeName)
Map type name to the new name. Subclasses can override.

Parameters:
typeName - the type name
Returns:
new name, default implementation is the identity.


Copyright © 2001–2018 JBoss by Red Hat. All rights reserved.