Class ClassAsset

    • Constructor Detail

      • ClassAsset

        public ClassAsset​(Class<?> clazz)
        Load any class as a resource.
        Parameters:
        clazz - The class to load
        Throws:
        IllegalArgumentException - Class can not be null
    • Method Detail

      • openStream

        public InputStream openStream()
        Converts the Class name into a Resource URL and uses the ClassloaderResource for loading the Class.
        Specified by:
        openStream in interface Asset
        Returns:
        A new open InputStream for each call
      • getSource

        public Class<?> getSource()
        Returns the loaded class.