Examples of ImmutableDexFile


Examples of org.jf.dexlib2.immutable.ImmutableDexFile

                methodImpl);

        ClassDef classDef = new ImmutableClassDef("Lblah;", AccessFlags.PUBLIC.getValue(), "Ljava/lang/Object;", null,
                null, null, null, null, null, ImmutableList.of(method));

        DexFile dexFile = new ImmutableDexFile(ImmutableList.of(classDef));

        ClassPath classPath = ClassPath.fromClassPath(ImmutableList.<String>of(), ImmutableList.<String>of(), dexFile,
                15);
        InlineMethodResolver inlineMethodResolver = new CustomInlineMethodResolver(classPath, "Lblah;->blah()V");
        MethodAnalyzer methodAnalyzer = new MethodAnalyzer(classPath, method, inlineMethodResolver);
View Full Code Here

Examples of org.jf.dexlib2.immutable.ImmutableDexFile

                methodImpl);

        ClassDef classDef = new ImmutableClassDef("Lblah;", AccessFlags.PUBLIC.getValue(), "Ljava/lang/Object;", null,
                null, null, null, null, ImmutableList.of(method), null);

        DexFile dexFile = new ImmutableDexFile(ImmutableList.of(classDef));

        ClassPath classPath = ClassPath.fromClassPath(ImmutableList.<String>of(), ImmutableList.<String>of(), dexFile,
                15);
        InlineMethodResolver inlineMethodResolver = new CustomInlineMethodResolver(classPath, "Lblah;->blah()V");
        MethodAnalyzer methodAnalyzer = new MethodAnalyzer(classPath, method, inlineMethodResolver);
View Full Code Here

Examples of org.jf.dexlib2.immutable.ImmutableDexFile

                methodImpl);

        ClassDef classDef = new ImmutableClassDef("Lblah;", AccessFlags.PUBLIC.getValue(), "Ljava/lang/Object;", null,
                null, null, null, null, ImmutableList.of(method), null);

        DexFile dexFile = new ImmutableDexFile(ImmutableList.of(classDef));

        ClassPath classPath = ClassPath.fromClassPath(ImmutableList.<String>of(), ImmutableList.<String>of(), dexFile,
                15);
        InlineMethodResolver inlineMethodResolver = new CustomInlineMethodResolver(classPath, "Lblah;->blah()V");
        MethodAnalyzer methodAnalyzer = new MethodAnalyzer(classPath, method, inlineMethodResolver);
View Full Code Here

Examples of org.jf.dexlib2.immutable.ImmutableDexFile

    //   fivethree

    private final ClassPath classPath;

    public CommonSuperclassTest() throws IOException {
        classPath = new ClassPath(new ImmutableDexFile(ImmutableSet.of(
                TestUtils.makeClassDef("Ljava/lang/Object;", null),
                TestUtils.makeClassDef("Ltest/one;", "Ljava/lang/Object;"),
                TestUtils.makeClassDef("Ltest/two;", "Ljava/lang/Object;"),
                TestUtils.makeClassDef("Ltest/onetwo;", "Ltest/one;"),
                TestUtils.makeClassDef("Ltest/onetwothree;", "Ltest/onetwo;"),
View Full Code Here

Examples of org.jf.dexlib2.immutable.ImmutableDexFile

                0, "Ljava/lang/Object;", null, null, ImmutableSet.of(annotation), null, null);

        MemoryDataStore dataStore = new MemoryDataStore();

        try {
            DexPool.writeTo(dataStore, new ImmutableDexFile(ImmutableSet.of(classDef)));
        } catch (IOException ex) {
            throw new RuntimeException(ex);
        }

        DexBackedDexFile dexFile = new DexBackedDexFile(new Opcodes(15), dataStore.getData());
View Full Code Here

Examples of org.jf.dexlib2.immutable.ImmutableDexFile

        ClassDef threeClassDef = TestUtils.makeClassDef("Ltest/three;", "Ltest/two;");

        ImmutableSet<ClassDef> classes = ImmutableSet.<ClassDef>of(
                objectClassDef, oneClassDef, twoClassDef, threeClassDef);

        ClassPath classPath = new ClassPath(new ImmutableDexFile(classes));

        TypeProto objectClassProto = classPath.getClass("Ljava/lang/Object;");
        TypeProto oneClassProto = classPath.getClass("Ltest/one;");
        TypeProto twoClassProto = classPath.getClass("Ltest/two;");
        TypeProto threeClassProto = classPath.getClass("Ltest/three;");
View Full Code Here

Examples of org.jf.dexlib2.immutable.ImmutableDexFile

        // Ltest/one; isn't defined

        ClassDef twoClassDef = TestUtils.makeClassDef("Ltest/two;", "Ltest/one;");
        ClassDef threeClassDef = TestUtils.makeClassDef("Ltest/three;", "Ltest/two;");
        ImmutableSet<ClassDef> classes = ImmutableSet.<ClassDef>of(twoClassDef, threeClassDef);
        ClassPath classPath = new ClassPath(new ImmutableDexFile(classes));

        TypeProto unknownClassProto = classPath.getUnknownClass();
        TypeProto oneClassProto = classPath.getClass("Ltest/one;");
        TypeProto twoClassProto = classPath.getClass("Ltest/two;");
        TypeProto threeClassProto = classPath.getClass("Ltest/three;");
View Full Code Here

Examples of org.jf.dexlib2.immutable.ImmutableDexFile

        loadedClasses.put(type, new PrimitiveProto(this, type));
    }

    private static DexFile getBasicClasses() {
        // fallbacks for some special classes that we assume are present
        return new ImmutableDexFile(ImmutableSet.of(
                new ReflectionClassDef(Class.class),
                new ReflectionClassDef(Cloneable.class),
                new ReflectionClassDef(Object.class),
                new ReflectionClassDef(Serializable.class),
                new ReflectionClassDef(String.class),
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.