com.manydesigns.portofino.code.CodeBase Maven / Gradle / Ivy
package com.manydesigns.portofino.code;
import io.reactivex.subjects.Subject;
import org.apache.commons.vfs2.FileObject;
import java.io.IOException;
/**
* Created by alessio on 28/03/17.
*/
public interface CodeBase {
Class loadClass(String className, SearchScope searchScope) throws IOException, ClassNotFoundException;
default Class loadClass(String className) throws IOException, ClassNotFoundException {
return loadClass(className, SearchScope.LOCAL_PARENT_CLASSLOADER);
}
ClassLoader getClassLoader();
FileObject getRoot();
void close();
default ClassLoader asClassLoader() {
return new CodeBaseClassLoader(this);
}
default void clear() throws Exception {
clear(true);
}
void clear(boolean recursively) throws Exception;
CodeBase getParent();
Subject getReloads();
enum SearchScope {
LOCAL, LOCAL_PARENT, LOCAL_PARENT_CLASSLOADER;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy