app/src/main/java/db/juhaku/juhakudb/core/android/DatabaseManager.java
/*
     * Resolve classes by given criteria and return resolved classes as array.
     */
Resolve classes by given criteria and return resolved classes as array.
Resolve classes by given criteria and return resolved classes as array .
private Class<?>[] resolveClasses(Context context, Criteria criteria) {
        Class<?>[] retVal = new Class[0];
        for (DexFile dexFile : getSourceDexFiles(context)) {
            if (dexFile != null) {
                Enumeration<String> dexEntries = dexFile.entries();
                while (dexEntries.hasMoreElements()) {
                    String dexFileName = dexEntries.nextElement();
                    if (!criteria.meetCriteria(dexFileName)) {
                        continue;
                    }
                    Class<?> clazz = initializeClass(dexFileName);
                    if (clazz != null) {
                        int length = retVal.length;
                        Class<?>[] newRetVal = new Class[length + 1];
                        System.arraycopy(retVal, 0, newRetVal, 0, length);
                        newRetVal[length] = clazz;
                        retVal = newRetVal;
                    }
                }
            }
        }
        return retVal;
    }
private Class < ? > [ ] resolveClasses ( Context context , Criteria criteria ) { Class < ? > [ ] retVal = new Class [ 0 ] ; for ( DexFile dexFile : getSourceDexFiles ( context ) ) { if ( dexFile != null ) { Enumeration < String > dexEntries = dexFile . entries ( ) ; while ( dexEntries . hasMoreElements ( ) ) { String dexFileName = dexEntries . nextElement ( ) ; if ( ! criteria . meetCriteria ( dexFileName ) ) { continue ; } Class < ? > clazz = initializeClass ( dexFileName ) ; if ( clazz != null ) { int length = retVal . length ; Class < ? > [ ] newRetVal = new Class [ length + 1 ] ; System . arraycopy ( retVal , 0 , newRetVal , 0 , length ) ; newRetVal [ length ] = clazz ; retVal = newRetVal ; } } } } return retVal ; }
Resolve classes by given criteria and return resolved classes as array.
Resolve classes by given criteria and return resolved classes as array .