Package soot.dexpler
Class DexAnnotation
- java.lang.Object
-
- soot.dexpler.DexAnnotation
-
public class DexAnnotation extends Object
Converts annotations from Dexlib to Jimple.- Author:
- alex
-
-
Field Summary
Fields Modifier and Type Field Description static StringDALVIK_ANNOTATION_DEFAULTstatic StringDALVIK_ANNOTATION_ENCLOSINGCLASSstatic StringDALVIK_ANNOTATION_ENCLOSINGMETHODstatic StringDALVIK_ANNOTATION_INNERCLASSstatic StringDALVIK_ANNOTATION_MEMBERCLASSESstatic StringDALVIK_ANNOTATION_SIGNATUREstatic StringDALVIK_ANNOTATION_THROWSprotected static Set<String>isHandledstatic StringJAVA_DEPRECATED
-
Constructor Summary
Constructors Constructor Description DexAnnotation(SootClass clazz, IInitialResolver.Dependencies deps)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddAnnotation(String classType, List<Tag> tags, VisibilityAnnotationTag[] vatg, org.jf.dexlib2.iface.Annotation a)protected voidaddNormalAnnotation(VisibilityAnnotationTag[] vatg, org.jf.dexlib2.iface.Annotation a, int v)Processes a normal annotation and adds it to the proper visibility annotation tag in the given arrayprotected static intgetVisibility(int visibility)Converts Dexlib visibility to Jimple visibility.voidhandleClassAnnotation(org.jf.dexlib2.iface.ClassDef classDef)Converts Class annotations from Dexlib to Jimple.voidhandleFieldAnnotation(Host h, org.jf.dexlib2.iface.Field f)Converts field annotations from Dexlib to JimplevoidhandleMethodAnnotation(Host h, org.jf.dexlib2.iface.Method method)Converts method and method parameters annotations from Dexlib to Jimple
-
-
-
Field Detail
-
JAVA_DEPRECATED
public static final String JAVA_DEPRECATED
- See Also:
- Constant Field Values
-
DALVIK_ANNOTATION_THROWS
public static final String DALVIK_ANNOTATION_THROWS
- See Also:
- Constant Field Values
-
DALVIK_ANNOTATION_SIGNATURE
public static final String DALVIK_ANNOTATION_SIGNATURE
- See Also:
- Constant Field Values
-
DALVIK_ANNOTATION_MEMBERCLASSES
public static final String DALVIK_ANNOTATION_MEMBERCLASSES
- See Also:
- Constant Field Values
-
DALVIK_ANNOTATION_INNERCLASS
public static final String DALVIK_ANNOTATION_INNERCLASS
- See Also:
- Constant Field Values
-
DALVIK_ANNOTATION_ENCLOSINGMETHOD
public static final String DALVIK_ANNOTATION_ENCLOSINGMETHOD
- See Also:
- Constant Field Values
-
DALVIK_ANNOTATION_ENCLOSINGCLASS
public static final String DALVIK_ANNOTATION_ENCLOSINGCLASS
- See Also:
- Constant Field Values
-
DALVIK_ANNOTATION_DEFAULT
public static final String DALVIK_ANNOTATION_DEFAULT
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
DexAnnotation
public DexAnnotation(SootClass clazz, IInitialResolver.Dependencies deps)
-
-
Method Detail
-
handleClassAnnotation
public void handleClassAnnotation(org.jf.dexlib2.iface.ClassDef classDef)
Converts Class annotations from Dexlib to Jimple.- Parameters:
classDef-
-
handleFieldAnnotation
public void handleFieldAnnotation(Host h, org.jf.dexlib2.iface.Field f)
Converts field annotations from Dexlib to Jimple- Parameters:
h-f-
-
handleMethodAnnotation
public void handleMethodAnnotation(Host h, org.jf.dexlib2.iface.Method method)
Converts method and method parameters annotations from Dexlib to Jimple- Parameters:
h-method-
-
addAnnotation
protected void addAnnotation(String classType, List<Tag> tags, VisibilityAnnotationTag[] vatg, org.jf.dexlib2.iface.Annotation a)
-
addNormalAnnotation
protected void addNormalAnnotation(VisibilityAnnotationTag[] vatg, org.jf.dexlib2.iface.Annotation a, int v)
Processes a normal annotation and adds it to the proper visibility annotation tag in the given array- Parameters:
vatg- the visibility annotation tags for different visibility levelsa- the annotationv- the visibility
-
getVisibility
protected static int getVisibility(int visibility)
Converts Dexlib visibility to Jimple visibility. In Dalvik: VISIBILITY_BUILD 0x00 intended only to be visible at build time (e.g., during compilation of other code) VISIBILITY_RUNTIME 0x01 intended to visible at runtime VISIBILITY_SYSTEM 0x02 intended to visible at runtime, but only to the underlying system (and not to regular user code)- Parameters:
visibility- Dexlib visibility- Returns:
- Jimple visibility
-
-