类 KotlinAliasReferenceFixer
- 所有已实现的接口:
KotlinTypeVisitor,ClassVisitor
ClassVisitor fixes the aliasName of Kotlin types that reference a type alias
whose declaration container has been renamed.
ClassReferenceFixer re-derives a type's className from its referenced class,
but it leaves aliasName alone, because aliasName is a plain string naming the
alias's declaration site rather than a reference that ClassReferenceFixer
resolves. Run this fixer over the program class pool after ClassReferenceFixer (so
the declaration containers already carry their new names) to keep those strings consistent with
the renamed declarations.
The recorded format matches what ClassReferenceInitializer
parses 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 how ClassReferenceFixer skips unresolved references.
- 另请参阅:
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明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
-
构造器详细资料
-
KotlinAliasReferenceFixer
public KotlinAliasReferenceFixer()
-
-
方法详细资料
-
visitAnyClass
从接口复制的说明:ClassVisitorVisits any Clazz instance. The more specific default implementations of this interface delegate to this method.- 指定者:
visitAnyClass在接口中ClassVisitor
-
visitAnyType
- 指定者:
visitAnyType在接口中KotlinTypeVisitor
-