/** * Adds the specified file to the extension's classpath. * @param file file to add to the classpath. */ public static void addToClassPath(AbstractFile file) {loader.addFile(file);}
/** * Explores the content of the specified file and looks for classes that match the specified class filter. * <p> * This is a convenience method and is strictly equivalent to calling {@link #find(AbstractFile,ClassFilter,ClassLoader)} * with a class loader argument initialized with the following code: * <pre> * AbstractFileClassLoader loader; * * loader = new AbstractFileClassLoader(); * loader.addFile(browsable); * </pre> * </p> * @param browsable file in which to look for classes. * @param classFilter how to decide which classes should be kept. * @return a vector containing all the classes that were found and matched <code>classFilter</code>. * @throws IOException if an error occurs while exploring <code>browsable</code>. */ public List<Class<?>> find(AbstractFile browsable, ClassFilter classFilter) throws IOException { AbstractFileClassLoader classLoader; // Default class loader. // Initializes the default class loader. classLoader = new AbstractFileClassLoader(); classLoader.addFile(browsable); // Explores browsable. return find(browsable, classFilter, classLoader); } }