org.codehaus.janino.util.resource
Class PathResourceFinder

java.lang.Object
  extended by org.codehaus.janino.util.resource.ResourceFinder
      extended by org.codehaus.janino.util.resource.MultiResourceFinder
          extended by org.codehaus.janino.util.resource.LazyMultiResourceFinder
              extended by org.codehaus.janino.util.resource.PathResourceFinder

public class PathResourceFinder
extends LazyMultiResourceFinder

A ResourceFinder that finds its resources along a "path" consisting of JAR file names, ZIP file names, and directory names.

See Also:
ZipFileResourceFinder, DirectoryResourceFinder

Field Summary
 
Fields inherited from class org.codehaus.janino.util.resource.ResourceFinder
EMPTY_RESOURCE_FINDER
 
Constructor Summary
PathResourceFinder(java.io.File[] entries)
           
PathResourceFinder(java.util.Iterator entries)
           
PathResourceFinder(java.lang.String path)
           
 
Method Summary
static java.io.File[] parsePath(java.lang.String s)
          Break a given string up by the system-dependent path-separator character (on UNIX systems, this character is ':'; on Microsoft Windows systems it is ';').
 
Methods inherited from class org.codehaus.janino.util.resource.MultiResourceFinder
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, toString, wait, wait, wait
 

Constructor Detail

PathResourceFinder

public PathResourceFinder(java.io.File[] entries)
Parameters:
entries - The entries of the "path"

PathResourceFinder

public PathResourceFinder(java.util.Iterator entries)
Parameters:
entries - The entries of the "path" (type must be File)

PathResourceFinder

public PathResourceFinder(java.lang.String path)
Parameters:
path - A java-like path, i.e. a "path separator"-separated list of entries.
Method Detail

parsePath

public static java.io.File[] parsePath(java.lang.String s)
Break a given string up by the system-dependent path-separator character (on UNIX systems, this character is ':'; on Microsoft Windows systems it is ';'). Empty components are ignored.

UNIX Examples:

A:B:C
A, B, C
::B:
B
:A
A
(Empty string)
(Zero components)

See Also:
File.pathSeparatorChar


Copyright © 2001-2011. All Rights Reserved.