de.smartics.util.lang.classpath
Interface ClassPathListing

Package class diagram package ClassPathListing
All Known Implementing Classes:
JarAndFileClassPathListing

@ServiceInterface
public interface ClassPathListing

Service to list the contents of a folder on the class path.


Method Summary
 List<String> list(ClassPathContext context, String resourcePath)
          Lists the contents of the resource path.
 

Method Detail

list

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

Parameters:
context - the context to load the resource from the class path.
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 context or 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 Kronseder & Reiner GmbH - smartics. All Rights Reserved.