类 KotlinAliasReferenceFixer
- java.lang.Object
-
- proguard.classfile.editor.KotlinAliasReferenceFixer
-
- 所有已实现的接口:
KotlinTypeVisitor,ClassVisitor
public class KotlinAliasReferenceFixer extends java.lang.Object implements ClassVisitor, KotlinTypeVisitor
ThisClassVisitorfixes thealiasNameof Kotlin types that reference a type alias whose declaration container has been renamed.ClassReferenceFixerre-derives a type'sclassNamefrom its referenced class, but it leavesaliasNamealone, becausealiasNameis a plain string naming the alias's declaration site rather than a reference thatClassReferenceFixerresolves. Run this fixer over the program class pool afterClassReferenceFixer(so the declaration containers already carry their new names) to keep those strings consistent with the renamed declarations.The recorded format matches what
ClassReferenceInitializerparses back: an alias declared in a class is<declaring class>.<simple name>; one declared in a file facade (or multi-file part) is<facade package>/<simple name>. Both pieces are read from the post-rename declaration container, so the rewrite holds under any renaming, including a move to another package. An unresolved reference (no referenced type alias) is left untouched, mirroring howClassReferenceFixerskips unresolved references.- 另请参阅:
ClassReferenceFixer
-
-
构造器概要
构造器 构造器 说明 KotlinAliasReferenceFixer()
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 voidvisitAnyClass(Clazz clazz)Visits any Clazz instance.voidvisitAnyType(Clazz clazz, KotlinTypeMetadata kotlinTypeMetadata)-
从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
从接口继承的方法 proguard.classfile.visitor.ClassVisitor
visitLibraryClass, visitProgramClass
-
从接口继承的方法 proguard.classfile.kotlin.visitor.KotlinTypeVisitor
visitAbbreviation, visitAliasExpandedType, visitAliasUnderlyingType, visitAnyContextReceiverType, visitClassContextReceiverType, visitConstructorValParamType, visitConstructorValParamVarArgType, visitFunctionContextReceiverType, visitFunctionReceiverType, visitFunctionReturnType, visitFunctionValParamType, visitFunctionValParamVarArgType, visitInlineClassUnderlyingPropertyType, visitOuterClass, visitParameterUpperBound, visitPropertyContextReceiverType, visitPropertyReceiverType, visitPropertyType, visitPropertyValParamType, visitPropertyValParamVarArgType, visitStarProjection, visitSuperType, visitTypeArgument, visitTypeOfIsExpression, visitTypeUpperBound
-
-
-
-
方法详细资料
-
visitAnyClass
public void visitAnyClass(Clazz clazz)
从接口复制的说明:ClassVisitorVisits any Clazz instance. The more specific default implementations of this interface delegate to this method.- 指定者:
visitAnyClass在接口中ClassVisitor
-
visitAnyType
public void visitAnyType(Clazz clazz, KotlinTypeMetadata kotlinTypeMetadata)
- 指定者:
visitAnyType在接口中KotlinTypeVisitor
-
-