Class DexFix


  • public final class DexFix
    extends java.lang.Object
    1. Dex omits the value of static-final field if it is the default value.

    2. static-final field init by zero, but assigned in clinit

    this method is try to fix the problems.

    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void fixStaticFinalFieldValue​(com.googlecode.d2j.node.DexClassNode classNode)
      Target: Class
      static void fixStaticFinalFieldValue​(com.googlecode.d2j.node.DexFileNode dex)  
      static void fixTooLongStringConstant​(com.googlecode.d2j.node.DexMethodNode methodNode)
      Target: Method
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • fixStaticFinalFieldValue

        public static void fixStaticFinalFieldValue​(com.googlecode.d2j.node.DexFileNode dex)
      • fixStaticFinalFieldValue

        public static void fixStaticFinalFieldValue​(com.googlecode.d2j.node.DexClassNode classNode)
        Target: Class

        init value to default if the field is static and final, and the field is not init in clinit method

        erase the default value if the field is init in clinit method

      • fixTooLongStringConstant

        public static void fixTooLongStringConstant​(com.googlecode.d2j.node.DexMethodNode methodNode)
        Target: Method

        Fixes too long strings not being translated correctly