Class DirectoryClassLoader

java.lang.Object
java.lang.ClassLoader
org.frankframework.configuration.classloaders.AbstractClassLoader
org.frankframework.configuration.classloaders.DirectoryClassLoader
All Implemented Interfaces:
IConfigurationClassLoader, org.springframework.beans.factory.DisposableBean, org.springframework.beans.factory.InitializingBean, org.springframework.core.SmartClassLoader
Direct Known Subclasses:
RelativePathDirectoryClassLoader, ScanningDirectoryClassLoader

public class DirectoryClassLoader extends AbstractClassLoader
  • Constructor Details

    • DirectoryClassLoader

      public DirectoryClassLoader(ClassLoader parent)
  • Method Details

    • afterPropertiesSet

      public void afterPropertiesSet() throws ClassLoaderException
      Specified by:
      afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
      Overrides:
      afterPropertiesSet in class AbstractClassLoader
      Throws:
      ClassLoaderException
    • isAllowCustomClasses

      public boolean isAllowCustomClasses()
      Never allow custom code when using this classloader. Classes should be placed on the classpath (eg. src/main/resources).
    • setDirectory

      public void setDirectory(String directory) throws ClassLoaderException
      Set the directory from which the configuration files should be loaded
      Throws:
      ClassLoaderException - if the directory can't be found
    • getLocalResource

      public URL getLocalResource(@NonNull String name)
      Specified by:
      getLocalResource in class AbstractClassLoader
      Parameters:
      name - of the file to search for in the current local classpath
      Returns:
      the URL of the file if found in the ClassLoader or null when the file cannot be found
    • toString

      public String toString()
      Overrides:
      toString in class AbstractClassLoader