org.objectweb.jonas.ear.lib
Class JarList

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList<E>
          extended by java.util.Vector
              extended by org.objectweb.jonas.ear.lib.JarList
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.lang.Iterable, java.util.Collection, java.util.List, java.util.RandomAccess

public class JarList
extends java.util.Vector

JOnAS Jar list This class provides a way for managing the class-path dependency libraries.

Author:
Florent Benoit, Ludovic Bert
See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.Vector
capacityIncrement, elementCount, elementData
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
JarList()
          Construct an instance of a JarList
JarList(java.lang.String[] strs)
          Construct an instance of a JarList
JarList(java.util.StringTokenizer st)
          Construct an instance of a JarList
JarList(Web[] wars)
          Construct an instance of a JarList with a wars Array
 
Method Summary
 void add(java.lang.String fileName)
          Add the specified file to the current list.
 java.net.URL[] getURLs(java.lang.String dirName)
          Get the URLs of all the JAR file list append to dirName.
 void merge(JarList jarList)
          Merge the specified JarList to the current JarList without adding duplicate entry.
 void remove(JarList jarList)
          Remove all the entries contained in the jarList to the current jarList.
 void setRelativePath(java.lang.String path)
          Set the relative path of the current list.
 
Methods inherited from class java.util.Vector
add, add, addAll, addAll, addElement, capacity, clear, clone, contains, containsAll, copyInto, elementAt, elements, ensureCapacity, equals, firstElement, get, hashCode, indexOf, indexOf, insertElementAt, isEmpty, lastElement, lastIndexOf, lastIndexOf, remove, remove, removeAll, removeAllElements, removeElement, removeElementAt, removeRange, retainAll, set, setElementAt, setSize, size, subList, toArray, toArray, toString, trimToSize
 
Methods inherited from class java.util.AbstractList
iterator, listIterator, listIterator
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
iterator, listIterator, listIterator
 

Constructor Detail

JarList

public JarList()
Construct an instance of a JarList


JarList

public JarList(java.util.StringTokenizer st)
Construct an instance of a JarList

Parameters:
st - a String tokenizer

JarList

public JarList(java.lang.String[] strs)
Construct an instance of a JarList

Parameters:
strs - an array of files

JarList

public JarList(Web[] wars)
Construct an instance of a JarList with a wars Array

Parameters:
wars - an array of war file
Method Detail

add

public void add(java.lang.String fileName)
Add the specified file to the current list.

Parameters:
fileName - the name of the file to add.

getURLs

public java.net.URL[] getURLs(java.lang.String dirName)
                       throws JarListException
Get the URLs of all the JAR file list append to dirName.

Parameters:
dirName - the name of the directory where we append the files.
Returns:
the absolute URLs of the JAR files.
Throws:
JarListException - if url are malformed

merge

public void merge(JarList jarList)
Merge the specified JarList to the current JarList without adding duplicate entry.

Parameters:
jarList - the list to merge.

remove

public void remove(JarList jarList)
Remove all the entries contained in the jarList to the current jarList.

Parameters:
jarList - the jarList to remove.

setRelativePath

public void setRelativePath(java.lang.String path)
Set the relative path of the current list. This is useful in the case of an EAR file because the class-path is relative to the JAR file and not the EAR file.

Parameters:
path - the path for set the relative path