Package sootup.apk.frontend.Util
Class DexUtil
java.lang.Object
sootup.apk.frontend.Util.DexUtil
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic @Nullable ObjectconvertAnnotationDefault(@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.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.static StringdottedClassName(String typeDescriptor) extractThrownExceptions(@NonNull Set<? extends org.jf.dexlib2.iface.Annotation> annotations, @NonNull IdentifierFactory identifierFactory) Extracts the declared exceptions of a method from itsdalvik.annotation.Throwssystem annotation.static AndroidVersionInfogetAnnotationDefaults(@NonNull Set<? extends org.jf.dexlib2.iface.Annotation> classAnnotations) Returns the default values of the methods of an annotation by method name.static ClassTypegetClassTypeFromClassName(String name, @NonNull IdentifierFactory identifierFactory) static booleanisByteCodeClassName(String className) static voidsetAndroidVersionInfo(AndroidVersionInfo androidVersionInfo) static ClassTypestringToJimpleType(View view, String className) static StringtoQualifiedName(@NonNull String str) static TypetoSootType(String typeDescriptor, int pos, @NonNull IdentifierFactory identifierFactory)
-
Constructor Details
-
DexUtil
public DexUtil()
-
-
Method Details
-
toSootType
public static Type toSootType(String typeDescriptor, int pos, @NonNull IdentifierFactory identifierFactory) -
toQualifiedName
-
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 itsdalvik.annotation.Throwssystem 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 thedalvik.annotation.AnnotationDefaultsystem 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
-
dottedClassName
-
isByteCodeClassName
-
getClassTypeFromClassName
public static ClassType getClassTypeFromClassName(String name, @NonNull IdentifierFactory identifierFactory) -
setAndroidVersionInfo
-
getAndroidVersionInfo
-