de.smartics.util.lang
Class ClassPathDirectoryListing

java.lang.Object
  extended by de.smartics.util.lang.ClassPathDirectoryListing

Deprecated.  Moved to ClassPathDirectoryListing.

@Deprecated
public class ClassPathDirectoryListing
     
     
extends Object

Lists the content of a directory on the class path.

Currently only the protocols

  1. file system (file) and
  2. JAR files (jar)

are supported.


Constructor Summary
ClassPathDirectoryListing(ClassLoader classLoader)
          Deprecated. Default constructor.
ClassPathDirectoryListing(ClassPathContext context)
          Deprecated. Default constructor.
 
Method Summary
 ClassPathContext getClassPathContext()
          Deprecated. Returns the context to load the directory listings.
 List<String> list(String resourcePath)
          Deprecated. Lists the contents of the resource path.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClassPathDirectoryListing

public ClassPathDirectoryListing(ClassLoader classLoader)
                          throws NullPointerException
Deprecated. 
Default constructor.

Parameters:
classLoader - the class loader to load the directory listings.
Throws:
NullPointerException - if classLoader is null.

ClassPathDirectoryListing

public ClassPathDirectoryListing(ClassPathContext context)
                          throws NullPointerException
Deprecated. 
Default constructor.

Parameters:
context - the context to load the directory listings.
Throws:
NullPointerException - if classLoader is null.
Method Detail

getClassPathContext

public final ClassPathContext getClassPathContext()
Deprecated. 
Returns the context to load the directory listings.

Returns:
the context to load the directory listings.

list

public List<String> list(String resourcePath)
                  throws NullPointerException,
                         IllegalArgumentException
Deprecated. 
Lists the contents of the resource path.

Parameters:
resourcePath - the path to the resource whose contents is to be listed. The empty string returns the contents of the class loader's root directory (which is usually the parent class loader's root).
Returns:
the contents of the resource as names. The list may be empty, but is never null.
Throws:
NullPointerException - if resourcePath is null.
IllegalArgumentException - if resource path cannot be resolved to determine the contents. Either the protocol is unknown or there is a problem to access the resource's content physically.


Copyright © 2011–2013 smartics. All rights reserved.