Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.lutris.classloader
Class ClassPath  view ClassPath download ClassPath.java

java.lang.Object
  extended bycom.lutris.classloader.ClassPath

class ClassPath
extends java.lang.Object

A class path that is composed of ClassPathEntry objects. This class can be used in conjunction with a class loader to load classes and resources.

Version:
$Revision : 1.0 $

Field Summary
private  java.util.Vector classPath
          The class path Vector made up of ClassPathEntry objects.
private  com.lutris.logging.LogChannel logChannel
          Log channel to write messages to
private  boolean loggingEnabled
          Is logging enabled?
private  int logLevel
          Numeric log level number for LOGLEVEL string
 
Constructor Summary
  ClassPath(java.io.File[] entries, com.lutris.logging.LogChannel loadLogChannel)
          Constructs class path with specified class path entries.
  ClassPath(com.lutris.logging.LogChannel loadLogChannel)
          Constructs empty class path with no entries.
  ClassPath(java.lang.String[] entries, com.lutris.logging.LogChannel loadLogChannel)
          Constructs class path with specified class path entries.
  ClassPath(java.net.URL[] entries, com.lutris.logging.LogChannel loadLogChannel)
          Constructs class path with specified class path entries.
private ClassPath(java.util.Vector entries, com.lutris.logging.LogChannel loadLogChannel)
          Constructs class path with specified class path entries.
 
Method Summary
 void add(java.io.File[] entries)
          Adds specified class path entries to class path.
 void add(java.lang.String[] entries)
          Adds specified class path entries to class path.
 void add(java.net.URL[] entries)
          Adds specified class path entries to class path.
private  void add(java.util.Vector entries)
          Adds specified class path entries to class path.
 void clear()
          Clears class path by removing all entries.
private static java.util.Vector convertArrayToVector(java.lang.Object[] array, com.lutris.logging.LogChannel loadLogChannel)
          Converts array of Objects to Vector.
 int getLength()
          Get the number of entries in the classpath.
 java.util.Enumeration getPath()
          Gets an Enumeration of class path entries.
 Resource getResource(java.lang.String name)
          Gets resource represented by specified file name.
 void set(java.io.File[] entries)
          Sets class path with specified class path entries.
 void set(java.lang.String[] entries)
          Sets class path with specified class path entries.
 void set(java.net.URL[] entries)
          Sets class path with specified class path entries.
private  void set(java.util.Vector entries)
          Sets class path with specified class path entries.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

classPath

private java.util.Vector classPath
The class path Vector made up of ClassPathEntry objects.


loggingEnabled

private boolean loggingEnabled
Is logging enabled?


logChannel

private com.lutris.logging.LogChannel logChannel
Log channel to write messages to


logLevel

private int logLevel
Numeric log level number for LOGLEVEL string

Constructor Detail

ClassPath

public ClassPath(com.lutris.logging.LogChannel loadLogChannel)
Constructs empty class path with no entries.


ClassPath

public ClassPath(java.lang.String[] entries,
                 com.lutris.logging.LogChannel loadLogChannel)
Constructs class path with specified class path entries. The parameter is assumed to be an array of directories, URLs, and/or zip files.


ClassPath

public ClassPath(java.io.File[] entries,
                 com.lutris.logging.LogChannel loadLogChannel)
Constructs class path with specified class path entries. The parameter is assumed to be an array of zip files and/or directories.


ClassPath

public ClassPath(java.net.URL[] entries,
                 com.lutris.logging.LogChannel loadLogChannel)
Constructs class path with specified class path entries. The URLs can represent directories and/or zip files on the local machine and/or on remote machines.


ClassPath

private ClassPath(java.util.Vector entries,
                  com.lutris.logging.LogChannel loadLogChannel)
Constructs class path with specified class path entries. Vector entries must be ClassPathEntry objects.

Method Detail

set

public void set(java.lang.String[] entries)
Sets class path with specified class path entries. The parameter is assumed to be an array of directories, URLs, and/or zip files.


set

public void set(java.io.File[] entries)
Sets class path with specified class path entries. The parameter is assumed to be an array of zip files and/or directories.


set

public void set(java.net.URL[] entries)
Sets class path with specified class path entries. The URLs can represent directories and/or zip files on the local machine and/or on remote machines.


add

public void add(java.lang.String[] entries)
Adds specified class path entries to class path. The parameter is assumed to be an array of directories, URLs, and/or zip files.


add

public void add(java.io.File[] entries)
Adds specified class path entries to class path. The parameter is assumed to be an array of zip files and/or directories.


add

public void add(java.net.URL[] entries)
Adds specified class path entries to class path. The URLs can represent directories and/or zip files on the local machine and/or on remote machines.


clear

public void clear()
Clears class path by removing all entries.


getLength

public int getLength()
Get the number of entries in the classpath.


getPath

public java.util.Enumeration getPath()
Gets an Enumeration of class path entries.


getResource

public Resource getResource(java.lang.String name)
Gets resource represented by specified file name. The class path entries are searched in order to find the desired resource. If the resource is not found in the class path, null is returned.


set

private void set(java.util.Vector entries)
Sets class path with specified class path entries. Vector entries must be ClassPathEntry objects. All null and duplicate entries are removed.


add

private void add(java.util.Vector entries)
Adds specified class path entries to class path. Vector entries must be ClassPathEntry objects. All null and duplicate entries are removed.


convertArrayToVector

private static java.util.Vector convertArrayToVector(java.lang.Object[] array,
                                                     com.lutris.logging.LogChannel loadLogChannel)
Converts array of Objects to Vector. Converts all array objects to ClassPathEntry objects and removes nulls and duplicates.