Class DexUtil

java.lang.Object
sootup.apk.frontend.Util.DexUtil

public class DexUtil extends Object
  • Constructor Details

    • DexUtil

      public DexUtil()
  • Method Details

    • toSootType

      public static Type toSootType(String typeDescriptor, int pos, @NonNull IdentifierFactory identifierFactory)
    • toQualifiedName

      public static String toQualifiedName(@NonNull String str)
    • createAnnotationUsage

      public static @NonNull List<AnnotationUsage> createAnnotationUsage(@NonNull Set<? extends org.jf.dexlib2.iface.Annotation> annotations, @NonNull IdentifierFactory identifierFactory)
      Converts the annotations of a dex class, field, method or parameter. System annotations ( dalvik.annotation.*, visibility SYSTEM) encode classfile attributes like Throws, Signature or InnerClass and are skipped, like the bytecode frontend does not report attributes as annotations. BUILD annotations are runtime invisible, RUNTIME ones runtime visible.
    • extractThrownExceptions

      public static @NonNull List<ClassType> extractThrownExceptions(@NonNull Set<? extends org.jf.dexlib2.iface.Annotation> annotations, @NonNull IdentifierFactory identifierFactory)
      Extracts the declared exceptions of a method from its dalvik.annotation.Throws system annotation.
    • getAnnotationDefaults

      public static @NonNull Map<String,org.jf.dexlib2.iface.value.EncodedValue> getAnnotationDefaults(@NonNull Set<? extends org.jf.dexlib2.iface.Annotation> classAnnotations)
      Returns the default values of the methods of an annotation by method name. Dex keeps them in the dalvik.annotation.AnnotationDefault system annotation of the annotation class, as an annotation of that class whose elements are the defaults.
    • convertAnnotationDefault

      public static @Nullable Object convertAnnotationDefault(@NonNull org.jf.dexlib2.iface.value.EncodedValue value, @NonNull IdentifierFactory identifierFactory)
      Converts the default value of an annotation method like the bytecode frontend does: nested annotations are runtime visible.
    • stringToJimpleType

      public static ClassType stringToJimpleType(View view, String className)
    • dottedClassName

      public static String dottedClassName(String typeDescriptor)
    • isByteCodeClassName

      public static boolean isByteCodeClassName(String className)
    • getClassTypeFromClassName

      public static ClassType getClassTypeFromClassName(String name, @NonNull IdentifierFactory identifierFactory)
    • setAndroidVersionInfo

      public static void setAndroidVersionInfo(AndroidVersionInfo androidVersionInfo)
    • getAndroidVersionInfo

      public static AndroidVersionInfo getAndroidVersionInfo()