org.apache.avalon.composition.data
Class LibraryDirective

java.lang.Object
  extended byorg.apache.avalon.composition.data.LibraryDirective
All Implemented Interfaces:
Serializable

public class LibraryDirective
extends Object
implements Serializable

An library directive.

XML

An library element is normally contained within a scoping structure such as a classloader directive. The library element may contain any number of "include" or "group" elements.

    <library>
       <include>lib</include>
       <group>avalon-framework</group>
    </library>
 

Version:
$Revision: 1.1.1.1 $ $Date: 2003/09/24 09:31:07 $
Author:
Stephen McConnell
See Also:
Serialized Form

Constructor Summary
LibraryDirective()
          Create a new LibraryDirective instance.
LibraryDirective(String[] includes, String[] groups)
          Create a new LibraryDirective instance.
 
Method Summary
 String[] getGroups()
          Return the set of group identifiers.
 String[] getIncludes()
          Return the set of include path entries.
 File[] getOptionalExtensionDirectories(File base)
          Return the set of optional extension locations as a File[] relative to a supplied base directory.
 boolean isEmpty()
          Return the empty status of this directive.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LibraryDirective

public LibraryDirective()
Create a new LibraryDirective instance.


LibraryDirective

public LibraryDirective(String[] includes,
                        String[] groups)
Create a new LibraryDirective instance.

Parameters:
includes - the set of include paths
groups - the set of group identifiers
Method Detail

isEmpty

public boolean isEmpty()
Return the empty status of this directive.


getIncludes

public String[] getIncludes()
Return the set of include path entries.

Returns:
the include paths

getGroups

public String[] getGroups()
Return the set of group identifiers.

Returns:
the group identifiers

getOptionalExtensionDirectories

public File[] getOptionalExtensionDirectories(File base)
                                       throws IOException
Return the set of optional extension locations as a File[] relative to a supplied base directory.

Parameters:
base - a base directory against which relatve references shall be resolved
Returns:
an array of extension library locations
Throws:
IOException - if a path cannot be resolved to a directory


Copyright © Apache Software Foundation. All Rights Reserved.