org.codehaus.janino.util.resource
Class DirectoryResourceFinder

java.lang.Object
  extended by org.codehaus.janino.util.resource.ResourceFinder
      extended by org.codehaus.janino.util.resource.FileResourceFinder
          extended by org.codehaus.janino.util.resource.DirectoryResourceFinder

public class DirectoryResourceFinder
extends FileResourceFinder

A FileResourceFinder that finds file resources in a directory. The name of the file is constructed by concatenating a dirctory name with the resource name such that slashes in the resource name map to file separators.


Field Summary
 
Fields inherited from class org.codehaus.janino.util.resource.ResourceFinder
EMPTY_RESOURCE_FINDER
 
Constructor Summary
DirectoryResourceFinder(java.io.File directory)
           
 
Method Summary
protected  java.io.File findResourceAsFile(java.lang.String resourceName)
          Converts a given resource resource name into a File.
 java.lang.String toString()
           
 
Methods inherited from class org.codehaus.janino.util.resource.FileResourceFinder
findResource
 
Methods inherited from class org.codehaus.janino.util.resource.ResourceFinder
findResourceAsStream
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DirectoryResourceFinder

public DirectoryResourceFinder(java.io.File directory)
Parameters:
directory - the directory to use as the search base
Method Detail

toString

public final java.lang.String toString()
Overrides:
toString in class java.lang.Object

findResourceAsFile

protected final java.io.File findResourceAsFile(java.lang.String resourceName)
Description copied from class: FileResourceFinder
Converts a given resource resource name into a File.

Specified by:
findResourceAsFile in class FileResourceFinder


Copyright © 2001-2011. All Rights Reserved.