类 Remapper
java.lang.Object
cn.taketoday.bytecode.commons.Remapper
- 直接已知子类:
SimpleRemapper
A class responsible for remapping types and names.
- 作者:
- Eugene Kuleshov
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明protected SignatureVisitorcreateSignatureRemapper(SignatureVisitor signatureVisitor) Constructs a new remapper for signatures.Maps the internal name of a class to its new name.mapAnnotationAttributeName(String descriptor, String name) Maps an annotation attribute name.Returns the given descriptor, remapped withmap(String).mapFieldName(String owner, String name, String descriptor) Maps a field name to its new name.mapInnerClassName(String name, String ownerName, String innerName) Maps an inner class name to its new name.mapInvokeDynamicMethodName(String name, String descriptor) Maps an invokedynamic or a constant dynamic method name to its new name.mapMethodDesc(String methodDescriptor) Returns the given method descriptor, with its argument and return type descriptors remapped withmapDesc(String).mapMethodName(String owner, String name, String descriptor) Maps a method name to its new name.mapModuleName(String name) Maps a module name to its new name.mapPackageName(String name) Maps a package name to its new name.mapRecordComponentName(String owner, String name, String descriptor) Maps a record component name to its new name.mapSignature(String signature, boolean typeSignature) Returns the given signature, remapped with theSignatureVisitorreturned bycreateSignatureRemapper(SignatureVisitor).private TypeReturns the given internal name, remapped withmap(String).String[]Returns the given internal names, remapped withmap(String).Returns the given value, remapped with this remapper.
-
构造器详细资料
-
Remapper
public Remapper()
-
-
方法详细资料
-
mapDesc
Returns the given descriptor, remapped withmap(String).- 参数:
descriptor- a type descriptor.- 返回:
- the given descriptor, with its [array element type] internal name remapped with
map(String)(if the descriptor corresponds to an array or object type, otherwise the descriptor is returned as is).
-
mapType
- 参数:
type- a type, which can be a method type.- 返回:
- the given type, with its [array element type] internal name remapped with
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 withmapMethodDesc(String).
-
mapType
Returns the given internal name, remapped withmap(String).- 参数:
internalName- the internal name (or array type descriptor) of some (array) class.- 返回:
- the given internal name, remapped with
map(String).
-
mapTypes
Returns the given internal names, remapped withmap(String).- 参数:
internalNames- the internal names (or array type descriptors) of some (array) classes.- 返回:
- the given internal name, remapped with
map(String).
-
mapMethodDesc
Returns the given method descriptor, with its argument and return type descriptors remapped withmapDesc(String).- 参数:
methodDescriptor- a method descriptor.- 返回:
- the given method descriptor, with its argument and return type descriptors remapped
with
mapDesc(String).
-
mapValue
Returns the given value, remapped with this remapper. Possible values areBoolean,Byte,Short,Character,Integer,Long,Double,Float,String,Type,Handle,ConstantDynamicor arrays of primitive types .- 参数:
value- an object. OnlyType,HandleandConstantDynamicvalues are remapped.- 返回:
- the given value, remapped with this remapper.
-
mapSignature
Returns the given signature, remapped with theSignatureVisitorreturned bycreateSignatureRemapper(SignatureVisitor).- 参数:
signature- a JavaTypeSignature, ClassSignature or MethodSignature.typeSignature- whether the given signature is a JavaTypeSignature.- 返回:
- signature the given signature, remapped with the
SignatureVisitorreturned bycreateSignatureRemapper(SignatureVisitor).
-
createSignatureRemapper
Constructs a new remapper for signatures. The default implementation of this method returns a newSignatureRemapper.- 参数:
signatureVisitor- the SignatureVisitor the remapper must delegate to.- 返回:
- the newly created remapper.
-
mapAnnotationAttributeName
Maps an annotation attribute name. The default implementation of this method returns the given name, unchanged. Subclasses can override.- 参数:
descriptor- the descriptor of the annotation class.name- the name of the annotation attribute.- 返回:
- the new name of the annotation attribute.
-
mapInnerClassName
Maps an inner class name to its new name. The default implementation of this method provides a strategy that will work for inner classes produced by Java, but not necessarily other languages. Subclasses can override.- 参数:
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.- 返回:
- the new inner name of the inner class.
-
mapMethodName
Maps a method name to its new name. The default implementation of this method returns the given name, unchanged. Subclasses can override.- 参数:
owner- the internal name of the owner class of the method.name- the name of the method.descriptor- the descriptor of the method.- 返回:
- the new name of the method.
-
mapInvokeDynamicMethodName
Maps an invokedynamic or a constant dynamic method name to its new name. The default implementation of this method returns the given name, unchanged. Subclasses can override.- 参数:
name- the name of the method.descriptor- the descriptor of the method.- 返回:
- the new name of the method.
-
mapRecordComponentName
Maps a record component name to its new name. The default implementation of this method returns the given name, unchanged. Subclasses can override.- 参数:
owner- the internal name of the owner class of the field.name- the name of the field.descriptor- the descriptor of the field.- 返回:
- the new name of the field.
-
mapFieldName
Maps a field name to its new name. The default implementation of this method returns the given name, unchanged. Subclasses can override.- 参数:
owner- the internal name of the owner class of the field.name- the name of the field.descriptor- the descriptor of the field.- 返回:
- the new name of the field.
-
mapPackageName
Maps a package name to its new name. The default implementation of this method returns the given name, unchanged. Subclasses can override.- 参数:
name- the fully qualified name of the package (using dots).- 返回:
- the new name of the package.
-
mapModuleName
Maps a module name to its new name. The default implementation of this method returns the given name, unchanged. Subclasses can override.- 参数:
name- the fully qualified name (using dots) of a module.- 返回:
- the new name of the module.
-
map
Maps the internal name of a class to its new name. The default implementation of this method returns the given name, unchanged. Subclasses can override.- 参数:
internalName- the internal name of a class.- 返回:
- the new internal name.
-