Search in sources :

Example 6 with ImmutableAnnotation

use of org.jf.dexlib2.immutable.ImmutableAnnotation in project soot by Sable.

the class DexPrinter method buildCommonAnnotations.

private Set<Annotation> buildCommonAnnotations(AbstractHost host, Set<String> skipList) {
    Set<Annotation> annotations = new HashSet<Annotation>();
    // handle deprecated tag
    if (host.hasTag("DeprecatedTag") && !skipList.contains("Ljava/lang/Deprecated;")) {
        ImmutableAnnotation ann = new ImmutableAnnotation(AnnotationVisibility.RUNTIME, "Ljava/lang/Deprecated;", Collections.<AnnotationElement>emptySet());
        annotations.add(ann);
        skipList.add("Ljava/lang/Deprecated;");
    }
    // handle signature tag
    if (host.hasTag("SignatureTag") && !skipList.contains("Ldalvik/annotation/Signature;")) {
        SignatureTag tag = (SignatureTag) host.getTag("SignatureTag");
        List<String> splitSignature = SootToDexUtils.splitSignature(tag.getSignature());
        Set<ImmutableAnnotationElement> elements = null;
        if (splitSignature != null && splitSignature.size() > 0) {
            List<ImmutableEncodedValue> valueList = new ArrayList<ImmutableEncodedValue>();
            for (String s : splitSignature) {
                ImmutableStringEncodedValue val = new ImmutableStringEncodedValue(s);
                valueList.add(val);
            }
            ImmutableArrayEncodedValue valueValue = new ImmutableArrayEncodedValue(valueList);
            ImmutableAnnotationElement valueElement = new ImmutableAnnotationElement("value", valueValue);
            elements = Collections.singleton(valueElement);
        } else
            LOGGER.info("Signature annotation without value detected");
        ImmutableAnnotation ann = new ImmutableAnnotation(AnnotationVisibility.SYSTEM, "Ldalvik/annotation/Signature;", elements);
        annotations.add(ann);
        skipList.add("Ldalvik/annotation/Signature;");
    }
    return annotations;
}
Also used : ImmutableAnnotationElement(org.jf.dexlib2.immutable.ImmutableAnnotationElement) ArrayList(java.util.ArrayList) ImmutableEncodedValue(org.jf.dexlib2.immutable.value.ImmutableEncodedValue) ImmutableAnnotation(org.jf.dexlib2.immutable.ImmutableAnnotation) Annotation(org.jf.dexlib2.iface.Annotation) ImmutableAnnotation(org.jf.dexlib2.immutable.ImmutableAnnotation) ImmutableStringEncodedValue(org.jf.dexlib2.immutable.value.ImmutableStringEncodedValue) SignatureTag(soot.tagkit.SignatureTag) ImmutableArrayEncodedValue(org.jf.dexlib2.immutable.value.ImmutableArrayEncodedValue) HashSet(java.util.HashSet)

Example 7 with ImmutableAnnotation

use of org.jf.dexlib2.immutable.ImmutableAnnotation in project soot by Sable.

the class DexPrinter method buildMemberClassesAttribute.

private List<Annotation> buildMemberClassesAttribute(SootClass parentClass, InnerClassAttribute t, Set<String> skipList) {
    List<Annotation> anns = null;
    Set<String> memberClasses = null;
    // Collect the inner classes
    for (Tag t2 : t.getSpecs()) {
        InnerClassTag icTag = (InnerClassTag) t2;
        String outerClass = DexInnerClassParser.getOuterClassNameFromTag(icTag);
        // Only classes with names are member classes
        if (icTag.getOuterClass() != null && parentClass.getName().equals(outerClass)) {
            if (memberClasses == null)
                memberClasses = new HashSet<String>();
            memberClasses.add(SootToDexUtils.getDexClassName(icTag.getInnerClass()));
        }
    }
    // Write the member classes
    if (memberClasses != null && !memberClasses.isEmpty() && skipList.add("Ldalvik/annotation/MemberClasses;")) {
        List<EncodedValue> classes = new ArrayList<EncodedValue>();
        for (String memberClass : memberClasses) {
            ImmutableTypeEncodedValue classValue = new ImmutableTypeEncodedValue(memberClass);
            classes.add(classValue);
        }
        ImmutableArrayEncodedValue classesValue = new ImmutableArrayEncodedValue(classes);
        ImmutableAnnotationElement element = new ImmutableAnnotationElement("value", classesValue);
        ImmutableAnnotation memberAnnotation = new ImmutableAnnotation(AnnotationVisibility.SYSTEM, "Ldalvik/annotation/MemberClasses;", Collections.singletonList(element));
        if (anns == null)
            anns = new ArrayList<Annotation>();
        anns.add(memberAnnotation);
    }
    return anns;
}
Also used : ImmutableAnnotationElement(org.jf.dexlib2.immutable.ImmutableAnnotationElement) ArrayList(java.util.ArrayList) ImmutableTypeEncodedValue(org.jf.dexlib2.immutable.value.ImmutableTypeEncodedValue) ImmutableAnnotation(org.jf.dexlib2.immutable.ImmutableAnnotation) Annotation(org.jf.dexlib2.iface.Annotation) ImmutableAnnotation(org.jf.dexlib2.immutable.ImmutableAnnotation) InnerClassTag(soot.tagkit.InnerClassTag) ImmutableNullEncodedValue(org.jf.dexlib2.immutable.value.ImmutableNullEncodedValue) ImmutableFieldEncodedValue(org.jf.dexlib2.immutable.value.ImmutableFieldEncodedValue) ImmutableByteEncodedValue(org.jf.dexlib2.immutable.value.ImmutableByteEncodedValue) ImmutableStringEncodedValue(org.jf.dexlib2.immutable.value.ImmutableStringEncodedValue) ImmutableEncodedValue(org.jf.dexlib2.immutable.value.ImmutableEncodedValue) ImmutableAnnotationEncodedValue(org.jf.dexlib2.immutable.value.ImmutableAnnotationEncodedValue) ImmutableCharEncodedValue(org.jf.dexlib2.immutable.value.ImmutableCharEncodedValue) EncodedValue(org.jf.dexlib2.iface.value.EncodedValue) ImmutableFloatEncodedValue(org.jf.dexlib2.immutable.value.ImmutableFloatEncodedValue) ImmutableLongEncodedValue(org.jf.dexlib2.immutable.value.ImmutableLongEncodedValue) ImmutableShortEncodedValue(org.jf.dexlib2.immutable.value.ImmutableShortEncodedValue) ImmutableTypeEncodedValue(org.jf.dexlib2.immutable.value.ImmutableTypeEncodedValue) ImmutableDoubleEncodedValue(org.jf.dexlib2.immutable.value.ImmutableDoubleEncodedValue) ImmutableMethodEncodedValue(org.jf.dexlib2.immutable.value.ImmutableMethodEncodedValue) ImmutableArrayEncodedValue(org.jf.dexlib2.immutable.value.ImmutableArrayEncodedValue) ImmutableEnumEncodedValue(org.jf.dexlib2.immutable.value.ImmutableEnumEncodedValue) ImmutableIntEncodedValue(org.jf.dexlib2.immutable.value.ImmutableIntEncodedValue) ImmutableBooleanEncodedValue(org.jf.dexlib2.immutable.value.ImmutableBooleanEncodedValue) ConstantValueTag(soot.tagkit.ConstantValueTag) SourceFileTag(soot.tagkit.SourceFileTag) AnnotationDefaultTag(soot.tagkit.AnnotationDefaultTag) VisibilityAnnotationTag(soot.tagkit.VisibilityAnnotationTag) InnerClassTag(soot.tagkit.InnerClassTag) FloatConstantValueTag(soot.tagkit.FloatConstantValueTag) AnnotationTag(soot.tagkit.AnnotationTag) IntegerConstantValueTag(soot.tagkit.IntegerConstantValueTag) EnclosingMethodTag(soot.tagkit.EnclosingMethodTag) VisibilityParameterAnnotationTag(soot.tagkit.VisibilityParameterAnnotationTag) Tag(soot.tagkit.Tag) LineNumberTag(soot.tagkit.LineNumberTag) ParamNamesTag(soot.tagkit.ParamNamesTag) DoubleConstantValueTag(soot.tagkit.DoubleConstantValueTag) LongConstantValueTag(soot.tagkit.LongConstantValueTag) SignatureTag(soot.tagkit.SignatureTag) StringConstantValueTag(soot.tagkit.StringConstantValueTag) ImmutableArrayEncodedValue(org.jf.dexlib2.immutable.value.ImmutableArrayEncodedValue) HashSet(java.util.HashSet)

Example 8 with ImmutableAnnotation

use of org.jf.dexlib2.immutable.ImmutableAnnotation in project atlas by alibaba.

the class ClassReIClassDef method reAnnotation.

@Override
protected Annotation reAnnotation(Annotation annotation) {
    String type = annotation.getType();
    boolean isArray = false;
    if (type.startsWith("[")) {
        isArray = true;
    }
    String newType = DefineUtils.getDefineClassName(classProcessor.classProcess(DefineUtils.getDalvikClassName(type)).className, isArray);
    Set<? extends AnnotationElement> sets = annotation.getElements();
    Set<ImmutableAnnotationElement> newAnnotationElement = new HashSet<ImmutableAnnotationElement>();
    for (AnnotationElement annotationElement : sets) {
        String name = annotationElement.getName();
        EncodedValue encodedValue = annotationElement.getValue();
        if (encodedValue instanceof ArrayEncodedValue) {
            List<EncodedValue> lists = new ArrayList<EncodedValue>();
            for (EncodedValue encodedValueSub : ((ArrayEncodedValue) encodedValue).getValue()) {
                if (encodedValueSub instanceof StringEncodedValue) {
                    String newValue = null;
                    boolean isArray1 = false;
                    String value = ((StringEncodedValue) encodedValueSub).getValue();
                    if (value.startsWith("[")) {
                        isArray1 = true;
                    }
                    if (basicValue.contains(value)) {
                        newValue = value;
                    } else if (value.startsWith("Ljava/util/") || value.startsWith("Ljava/lang/") || !value.startsWith("L")) {
                        newValue = value;
                    } else {
                        if (value.endsWith(";")) {
                            newValue = DefineUtils.getDefineClassName(classProcessor.classProcess(DefineUtils.getDalvikClassName(value)).className, isArray1);
                        } else {
                            newValue = DefineUtils.getDotDefineClassName(classProcessor.classProcess(DefineUtils.getDotDalvikClassName(value)).className, isArray1);
                        }
                    }
                    ImmutableStringEncodedValue immutableStringEncodedValue = new ImmutableStringEncodedValue(newValue);
                    lists.add(immutableStringEncodedValue);
                } else if (encodedValueSub instanceof TypeEncodedValue) {
                    String newValueSub = null;
                    String value = ((TypeEncodedValue) encodedValueSub).getValue();
                    boolean isArray2 = false;
                    if (value.startsWith("[")) {
                        isArray2 = true;
                    }
                    if (basicValue.contains(value)) {
                        newValueSub = value;
                    } else if (value.startsWith("Ljava/util/") || !value.endsWith(";")) {
                        newValueSub = value;
                    } else {
                        newValueSub = DefineUtils.getDefineClassName(classProcessor.classProcess(DefineUtils.getDalvikClassName(value)).className, isArray2);
                    }
                    ImmutableTypeEncodedValue immutableTypeEncodedValue = new ImmutableTypeEncodedValue(newValueSub);
                    lists.add(immutableTypeEncodedValue);
                } else {
                    lists.add(encodedValue);
                }
            }
            ImmutableArrayEncodedValue immutableArrayEncodedValue = new ImmutableArrayEncodedValue(lists);
            ImmutableAnnotationElement immutableAnnotationElement = new ImmutableAnnotationElement(name, immutableArrayEncodedValue);
            newAnnotationElement.add(immutableAnnotationElement);
        } else if (encodedValue instanceof StringEncodedValue) {
            String value = ((StringEncodedValue) encodedValue).getValue();
            String newValue = null;
            isArray = false;
            if (value.startsWith("[")) {
                isArray = true;
            }
            if (basicValue.contains(value)) {
                newValue = value;
            } else if (value.startsWith("Ljava/util/") || value.startsWith("Ljava/lang/") || !value.startsWith("L")) {
                newValue = value;
            } else {
                if (value.endsWith(";")) {
                    newValue = DefineUtils.getDefineClassName(classProcessor.classProcess(DefineUtils.getDalvikClassName(value)).className, isArray);
                } else {
                    newValue = DefineUtils.getDotDefineClassName(classProcessor.classProcess(DefineUtils.getDotDalvikClassName(value)).className, isArray);
                }
            }
            ImmutableStringEncodedValue immutableStringEncodedValue = new ImmutableStringEncodedValue(newValue);
            ImmutableAnnotationElement immutableAnnotationElement = new ImmutableAnnotationElement(name, immutableStringEncodedValue);
            newAnnotationElement.add(immutableAnnotationElement);
        } else if (encodedValue instanceof TypeEncodedValue) {
            String newValue = null;
            String value = ((TypeEncodedValue) encodedValue).getValue();
            boolean isArray2 = false;
            if (value.startsWith("[")) {
                isArray2 = true;
            }
            if (basicValue.contains(value)) {
                newValue = value;
            } else if (value.startsWith("Ljava/util/") || !value.endsWith(";")) {
                newValue = value;
            } else {
                newValue = DefineUtils.getDefineClassName(classProcessor.classProcess(DefineUtils.getDalvikClassName(value)).className, isArray2);
            }
            ImmutableTypeEncodedValue immutableTypeEncodedValue = new ImmutableTypeEncodedValue(newValue);
            ImmutableAnnotationElement immutableAnnotationElement = new ImmutableAnnotationElement(name, immutableTypeEncodedValue);
            newAnnotationElement.add(immutableAnnotationElement);
        } else if (encodedValue instanceof MethodEncodedValue) {
            MethodReference methodReference = ((MethodEncodedValue) encodedValue).getValue();
            String returnType = methodReference.getReturnType();
            boolean isArray3 = false;
            if (returnType.startsWith("[")) {
                isArray3 = true;
            }
            boolean isBasic = basicType.containsKey(returnType);
            List<? extends CharSequence> paramTypes = methodReference.getParameterTypes();
            List<CharSequence> dalvikParamTypes = new ArrayList<CharSequence>();
            List<CharSequence> newParamTypes = new ArrayList<CharSequence>();
            for (CharSequence charSequence : paramTypes) {
                boolean isArray1 = false;
                if (charSequence.toString().startsWith("[")) {
                    isArray1 = true;
                }
                if (basicType.containsKey(charSequence.toString())) {
                    newParamTypes.add(charSequence);
                    dalvikParamTypes.add(basicType.get(charSequence.toString()));
                    continue;
                }
                dalvikParamTypes.add(DefineUtils.getDalvikClassName(charSequence.toString()) + (isArray1 ? "[]" : ""));
                newParamTypes.add(DefineUtils.getDefineClassName(classProcessor.classProcess(DefineUtils.getDalvikClassName(charSequence.toString())).className, isArray1));
            }
            final ImmutableMethodReference immutableReference = new ImmutableMethodReference(DefineUtils.getDefineClassName(classProcessor.classProcess(DefineUtils.getDalvikClassName(methodReference.getDefiningClass())).className, false), classProcessor.methodProcess(DefineUtils.getDalvikClassName(methodReference.getDefiningClass()), methodReference.getName(), isBasic ? basicType.get(methodReference.getReturnType()) : DefineUtils.getDalvikClassName(methodReference.getReturnType()) + (isArray3 ? "[]" : ""), StringUtils.join(dalvikParamTypes.toArray(), ",")).methodName, newParamTypes, isBasic ? returnType : DefineUtils.getDefineClassName(classProcessor.classProcess(DefineUtils.getDalvikClassName(methodReference.getReturnType())).className, methodReference.getReturnType().startsWith("[")));
            ImmutableMethodEncodedValue immutableMethodEncodedValue = new ImmutableMethodEncodedValue(immutableReference);
            ImmutableAnnotationElement immutableAnnotationElement = new ImmutableAnnotationElement(name, immutableMethodEncodedValue);
            newAnnotationElement.add(immutableAnnotationElement);
        } else {
            newAnnotationElement.add(ImmutableAnnotationElement.of(annotationElement));
        }
    }
    return new ImmutableAnnotation(annotation.getVisibility(), newType, newAnnotationElement);
}
Also used : ImmutableAnnotationElement(org.jf.dexlib2.immutable.ImmutableAnnotationElement) ImmutableTypeEncodedValue(org.jf.dexlib2.immutable.value.ImmutableTypeEncodedValue) ImmutableMethodReference(org.jf.dexlib2.immutable.reference.ImmutableMethodReference) ArrayList(java.util.ArrayList) ImmutableMethodEncodedValue(org.jf.dexlib2.immutable.value.ImmutableMethodEncodedValue) ImmutableArrayEncodedValue(org.jf.dexlib2.immutable.value.ImmutableArrayEncodedValue) ImmutableTypeEncodedValue(org.jf.dexlib2.immutable.value.ImmutableTypeEncodedValue) ImmutableMethodEncodedValue(org.jf.dexlib2.immutable.value.ImmutableMethodEncodedValue) ImmutableAnnotation(org.jf.dexlib2.immutable.ImmutableAnnotation) ImmutableStringEncodedValue(org.jf.dexlib2.immutable.value.ImmutableStringEncodedValue) ImmutableTypeEncodedValue(org.jf.dexlib2.immutable.value.ImmutableTypeEncodedValue) ImmutableArrayEncodedValue(org.jf.dexlib2.immutable.value.ImmutableArrayEncodedValue) ImmutableMethodEncodedValue(org.jf.dexlib2.immutable.value.ImmutableMethodEncodedValue) ImmutableAnnotationElement(org.jf.dexlib2.immutable.ImmutableAnnotationElement) AnnotationElement(org.jf.dexlib2.iface.AnnotationElement) ImmutableStringEncodedValue(org.jf.dexlib2.immutable.value.ImmutableStringEncodedValue) ImmutableStringEncodedValue(org.jf.dexlib2.immutable.value.ImmutableStringEncodedValue) MethodReference(org.jf.dexlib2.iface.reference.MethodReference) ImmutableMethodReference(org.jf.dexlib2.immutable.reference.ImmutableMethodReference) ArrayList(java.util.ArrayList) List(java.util.List) ImmutableArrayEncodedValue(org.jf.dexlib2.immutable.value.ImmutableArrayEncodedValue) HashSet(java.util.HashSet)

Example 9 with ImmutableAnnotation

use of org.jf.dexlib2.immutable.ImmutableAnnotation in project smali by JesusFreke.

the class RollbackTest method testRollback.

@Test
public void testRollback() throws IOException {
    ClassDef class1 = new ImmutableClassDef("Lcls1;", AccessFlags.PUBLIC.getValue(), "Ljava/lang/Object;", null, null, Lists.newArrayList(new ImmutableAnnotation(AnnotationVisibility.RUNTIME, "Lannotation;", null)), Lists.<Field>newArrayList(new ImmutableField("Lcls1;", "field1", "I", AccessFlags.PUBLIC.getValue(), null, null, null)), Lists.<Method>newArrayList(new ImmutableMethod("Lcls1;", "method1", Lists.<MethodParameter>newArrayList(new ImmutableMethodParameter("I", null, null)), "V", AccessFlags.PUBLIC.getValue(), null, null, null)));
    ClassDef class2 = new ImmutableClassDef("Lcls2;", AccessFlags.PUBLIC.getValue(), "Ljava/lang/Object;", null, null, Lists.newArrayList(new ImmutableAnnotation(AnnotationVisibility.RUNTIME, "Lannotation2;", null)), Lists.<Field>newArrayList(new ImmutableField("Lcls2;", "field2", "D", AccessFlags.PUBLIC.getValue(), null, null, null)), Lists.<Method>newArrayList(new ImmutableMethod("Lcls2;", "method2", Lists.<MethodParameter>newArrayList(new ImmutableMethodParameter("D", null, null)), "V", AccessFlags.PUBLIC.getValue(), null, null, null)));
    DexBackedDexFile dexFile1;
    {
        MemoryDataStore dataStore = new MemoryDataStore();
        DexPool dexPool = new DexPool(Opcodes.getDefault());
        dexPool.internClass(class1);
        dexPool.mark();
        dexPool.internClass(class2);
        dexPool.reset();
        dexPool.writeTo(dataStore);
        dexFile1 = new DexBackedDexFile(Opcodes.getDefault(), dataStore.getBuffer());
    }
    DexBackedDexFile dexFile2;
    {
        MemoryDataStore dataStore = new MemoryDataStore();
        DexPool dexPool = new DexPool(Opcodes.getDefault());
        dexPool.internClass(class1);
        dexPool.writeTo(dataStore);
        dexFile2 = new DexBackedDexFile(Opcodes.getDefault(), dataStore.getBuffer());
    }
    List<MapItem> mapItems1 = dexFile1.getMapItems();
    List<MapItem> mapItems2 = dexFile2.getMapItems();
    for (int i = 0; i < mapItems1.size(); i++) {
        Assert.assertEquals(mapItems1.get(i).getType(), mapItems2.get(i).getType());
        Assert.assertEquals(mapItems1.get(i).getItemCount(), mapItems2.get(i).getItemCount());
    }
}
Also used : DexPool(org.jf.dexlib2.writer.pool.DexPool) ClassDef(org.jf.dexlib2.iface.ClassDef) DexBackedDexFile(org.jf.dexlib2.dexbacked.DexBackedDexFile) MemoryDataStore(org.jf.dexlib2.writer.io.MemoryDataStore) MapItem(org.jf.dexlib2.dexbacked.raw.MapItem) Test(org.junit.Test)

Example 10 with ImmutableAnnotation

use of org.jf.dexlib2.immutable.ImmutableAnnotation in project smali by JesusFreke.

the class DexWriterTest method testEncodedAnnotationElementOrder.

@Test
public void testEncodedAnnotationElementOrder() {
    // Elements are out of order wrt to the element name
    ImmutableSet<ImmutableAnnotationElement> encodedElements = ImmutableSet.of(new ImmutableAnnotationElement("zabaglione", ImmutableNullEncodedValue.INSTANCE), new ImmutableAnnotationElement("blah", ImmutableNullEncodedValue.INSTANCE));
    ImmutableAnnotationEncodedValue encodedAnnotations = new ImmutableAnnotationEncodedValue("Lan/encoded/annotation", encodedElements);
    ImmutableSet<ImmutableAnnotationElement> elements = ImmutableSet.of(new ImmutableAnnotationElement("encoded_annotation", encodedAnnotations));
    ImmutableAnnotation annotation = new ImmutableAnnotation(AnnotationVisibility.RUNTIME, "Lorg/test/anno;", elements);
    ImmutableClassDef classDef = new ImmutableClassDef("Lorg/test/blah;", 0, "Ljava/lang/Object;", null, null, ImmutableSet.of(annotation), null, null);
    MemoryDataStore dataStore = new MemoryDataStore();
    try {
        DexPool.writeTo(dataStore, new ImmutableDexFile(Opcodes.getDefault(), ImmutableSet.of(classDef)));
    } catch (IOException ex) {
        throw new RuntimeException(ex);
    }
    DexBackedDexFile dexFile = new DexBackedDexFile(Opcodes.getDefault(), dataStore.getBuffer());
    ClassDef dbClassDef = Iterables.getFirst(dexFile.getClasses(), null);
    Assert.assertNotNull(dbClassDef);
    Annotation dbAnnotation = Iterables.getFirst(dbClassDef.getAnnotations(), null);
    Assert.assertNotNull(dbAnnotation);
    AnnotationElement element = Iterables.getFirst(dbAnnotation.getElements(), null);
    AnnotationEncodedValue dbAnnotationEncodedValue = (AnnotationEncodedValue) element.getValue();
    List<AnnotationElement> dbElements = Lists.newArrayList(dbAnnotationEncodedValue.getElements());
    // Ensure that the elements were written out in sorted order
    Assert.assertEquals(2, dbElements.size());
    Assert.assertEquals("blah", dbElements.get(0).getName());
    Assert.assertEquals("zabaglione", dbElements.get(1).getName());
}
Also used : DexBackedDexFile(org.jf.dexlib2.dexbacked.DexBackedDexFile) ImmutableAnnotationEncodedValue(org.jf.dexlib2.immutable.value.ImmutableAnnotationEncodedValue) AnnotationEncodedValue(org.jf.dexlib2.iface.value.AnnotationEncodedValue) ImmutableAnnotationElement(org.jf.dexlib2.immutable.ImmutableAnnotationElement) ImmutableClassDef(org.jf.dexlib2.immutable.ImmutableClassDef) MemoryDataStore(org.jf.dexlib2.writer.io.MemoryDataStore) IOException(java.io.IOException) ImmutableAnnotation(org.jf.dexlib2.immutable.ImmutableAnnotation) Annotation(org.jf.dexlib2.iface.Annotation) ImmutableAnnotation(org.jf.dexlib2.immutable.ImmutableAnnotation) ImmutableClassDef(org.jf.dexlib2.immutable.ImmutableClassDef) ClassDef(org.jf.dexlib2.iface.ClassDef) ImmutableAnnotationElement(org.jf.dexlib2.immutable.ImmutableAnnotationElement) AnnotationElement(org.jf.dexlib2.iface.AnnotationElement) ImmutableAnnotationEncodedValue(org.jf.dexlib2.immutable.value.ImmutableAnnotationEncodedValue) ImmutableDexFile(org.jf.dexlib2.immutable.ImmutableDexFile) Test(org.junit.Test)

Aggregations

ImmutableAnnotation (org.jf.dexlib2.immutable.ImmutableAnnotation)14 ImmutableAnnotationElement (org.jf.dexlib2.immutable.ImmutableAnnotationElement)12 ArrayList (java.util.ArrayList)10 Annotation (org.jf.dexlib2.iface.Annotation)10 HashSet (java.util.HashSet)9 AnnotationTag (soot.tagkit.AnnotationTag)8 VisibilityAnnotationTag (soot.tagkit.VisibilityAnnotationTag)8 VisibilityParameterAnnotationTag (soot.tagkit.VisibilityParameterAnnotationTag)8 AnnotationElement (org.jf.dexlib2.iface.AnnotationElement)7 ImmutableArrayEncodedValue (org.jf.dexlib2.immutable.value.ImmutableArrayEncodedValue)7 ImmutableStringEncodedValue (org.jf.dexlib2.immutable.value.ImmutableStringEncodedValue)7 ImmutableTypeEncodedValue (org.jf.dexlib2.immutable.value.ImmutableTypeEncodedValue)7 ImmutableEncodedValue (org.jf.dexlib2.immutable.value.ImmutableEncodedValue)6 ImmutableMethodEncodedValue (org.jf.dexlib2.immutable.value.ImmutableMethodEncodedValue)6 SignatureTag (soot.tagkit.SignatureTag)6 AnnotationDefaultTag (soot.tagkit.AnnotationDefaultTag)5 ConstantValueTag (soot.tagkit.ConstantValueTag)5 DoubleConstantValueTag (soot.tagkit.DoubleConstantValueTag)5 EnclosingMethodTag (soot.tagkit.EnclosingMethodTag)5 FloatConstantValueTag (soot.tagkit.FloatConstantValueTag)5