Search in sources :

Example 1 with ModuleRef

use of com.oracle.truffle.espresso.jdwp.api.ModuleRef in project graal by oracle.

the class ClassRegistries method getAllModuleRefs.

public ModuleRef[] getAllModuleRefs() {
    ArrayList<ModuleRef> list = new ArrayList<>();
    // add modules from boot registry
    list.addAll(bootClassRegistry.modules().values());
    // add modules from all other registries
    synchronized (weakClassLoaderSet) {
        for (StaticObject classLoader : weakClassLoaderSet) {
            list.addAll(getClassRegistry(classLoader).modules().values());
        }
    }
    return list.toArray(ModuleRef.EMPTY_ARRAY);
}
Also used : StaticObject(com.oracle.truffle.espresso.runtime.StaticObject) ModuleRef(com.oracle.truffle.espresso.jdwp.api.ModuleRef) ArrayList(java.util.ArrayList)

Aggregations

ModuleRef (com.oracle.truffle.espresso.jdwp.api.ModuleRef)1 StaticObject (com.oracle.truffle.espresso.runtime.StaticObject)1 ArrayList (java.util.ArrayList)1