package com.github.tmurakami.dexopener;

class ClassNameFilterImpl implements ClassNameFilter {

    private static final String[] IGNORED_PACKAGES = {
            "java.",
            "javax.",
            "dalvik.",
            "junit.",
            "org.junit.",
            "org.hamcrest.",
            "android.support.annotation.",
            "android.support.multidex.",
            "android.support.test.",
            "org.mockito.",
            "net.bytebuddy.",
            "org.objenesis.",
            "com.android.dx.",
            "com.github.tmurakami.dexmockito.",
            "com.github.tmurakami.dexopener.",
    };

    @Override
    public boolean accept(String className) {
        for (String pkg : IGNORED_PACKAGES) {
            if (className.startsWith(pkg)) {
                return false;
            }
        }
        return true;
    }

}

@@ -162,79 +162,154 @@
    %22
-java.%22,%0A            %22javax.%22,%0A            %22dalvik.%22,%0A            %22junit
+android.support.annotation.%22,%0A            %22android.support.multidex.%22,%0A            %22android.support.test.%22,%0A            %22com.android.internal.util
 .%22,%0A
@@ -325,17 +325,22 @@
    %22
-org.junit
+com.android.dx
 .%22,%0A
@@ -356,169 +356,198 @@
    %22
-org.hamcrest.%22,%0A            %22android.support.annotation.%22,%0A            %22android.support.multidex.%22,%0A            %22android.support.test.%22,%0A            %22org.mock
+com.github.tmurakami.dexmockito.%22,%0A            %22com.github.tmurakami.dexopener.%22,%0A            %22com.sun.%22,%0A            %22dalvik.%22,%0A            %22java.%22,%0A            %22javax.%22,%0A            %22jun
 it
-o
 .%22,%0A
@@ -597,379 +597,863 @@
 org.
-objenesis.%22,%0A            %22com.android.dx.%22,%0A            %22com.github.tmurakami.dexmockito.%22,%0A            %22com.github.tmurakami.dexopener.%22,%0A    %7D;%0A%0A    @Override%0A    public boolean accept(String className) %7B%0A        for (String pkg : IGNORED_PACKAGES) %7B%0A            if (className.startsWith(pkg)) %7B%0A                return false;%0A            %7D%0A        %7D%0A        return true
+apache.http.%22,%0A            %22org.apache.harmony.dalvik.%22,%0A            %22org.hamcrest.%22,%0A            %22org.json.%22,%0A            %22org.junit.%22,%0A            %22org.mockito.%22,%0A            %22org.objenesis.%22,%0A            %22org.w3c.dom.%22,%0A            %22org.xml.sax.%22,%0A            %22org.xmlpull.v1.%22,%0A    %7D;%0A%0A    @Override%0A    public boolean accept(String className) %7B%0A        for (String pkg : IGNORED_PACKAGES) %7B%0A            if (className.startsWith(pkg)) %7B%0A                return false;%0A            %7D%0A        %7D%0A        if (className.startsWith(%22android.%22) && !className.startsWith(%22android.support.%22)) %7B%0A            return false;%0A        %7D%0A        int dollar = className.indexOf('$');%0A        if (dollar == -1) %7B%0A            return true;%0A        %7D%0A        String name = className.substring(0, dollar);%0A        return !name.endsWith(%22.BuildConfig%22) && !name.endsWith(%22.R%22)
 ;%0A  

Add classes that should be loaded by the parent ClassLoader