类 KotlinSyntheticToStringObfuscator

  • 所有已实现的接口:
    proguard.classfile.kotlin.visitor.KotlinMetadataVisitor

    public class KotlinSyntheticToStringObfuscator
    extends java.lang.Object
    implements proguard.classfile.kotlin.visitor.KotlinMetadataVisitor
    Some types of Kotlin classes (i.e. data, value, inline) simply hold data. The compiler uses this fact to automatically generate functions that a programmer would normally implement manually. One of these functions is the default toString() and its potential implementation counterpart toString-impl(). The output of these functions is of the form "User(name=John, age=42)". This exposes unobfuscated classNames (in the example above "User") so we must update these className strings with their obfuscated versions. This class relies on the KotlinPropertyNameObfuscator storing the obfuscated name in the processingInfo field. And that the ClassObfuscator gives us the new class name (internally this also relies on the new class name being in the processingInfo field). One limitation of this class is that it requires that the Kotlin metadata is still attached to the classes that are processed. If the Kotlin metadata is stripped KotlinAnnotationStripper or removed by the KotlinMetadataAsserter the `toString` method's output cannot be updated with the obfuscated class name.
    • 方法概要

      所有方法 实例方法 具体方法 
      修饰符和类型 方法 说明
      void visitAnyKotlinMetadata​(proguard.classfile.Clazz clazz, proguard.classfile.kotlin.KotlinMetadata kotlinMetadata)  
      void visitKotlinClassMetadata​(proguard.classfile.Clazz clazz, proguard.classfile.kotlin.KotlinClassKindMetadata kotlinClassKindMetadata)  
      • 从类继承的方法 java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • 从接口继承的方法 proguard.classfile.kotlin.visitor.KotlinMetadataVisitor

        visitKotlinDeclarationContainerMetadata, visitKotlinFileFacadeMetadata, visitKotlinMultiFileFacadeMetadata, visitKotlinMultiFilePartMetadata, visitKotlinSyntheticClassMetadata, visitUnsupportedKotlinMetadata
    • 构造器详细资料

      • KotlinSyntheticToStringObfuscator

        public KotlinSyntheticToStringObfuscator()
    • 方法详细资料

      • visitAnyKotlinMetadata

        public void visitAnyKotlinMetadata​(proguard.classfile.Clazz clazz,
                                           proguard.classfile.kotlin.KotlinMetadata kotlinMetadata)
        指定者:
        visitAnyKotlinMetadata 在接口中 proguard.classfile.kotlin.visitor.KotlinMetadataVisitor
      • visitKotlinClassMetadata

        public void visitKotlinClassMetadata​(proguard.classfile.Clazz clazz,
                                             proguard.classfile.kotlin.KotlinClassKindMetadata kotlinClassKindMetadata)
        指定者:
        visitKotlinClassMetadata 在接口中 proguard.classfile.kotlin.visitor.KotlinMetadataVisitor