edu.udo.cs.yale.tools
Class ResourceSource

java.lang.Object
  extended by edu.udo.cs.yale.tools.ResourceSource

public class ResourceSource
extends java.lang.Object

ResourceSources can be added to the Tools class in order to allow resource loading for both the YALE core and the plugin. Each plugin might add a new new resource source indicating where the sources of the plugin can be found. Please note that a resource path is only allowed to contain '/' instead of using File.separator. This must be considered if a new prefix should be defined.

Version:
$Id: ResourceSource.java,v 2.4 2006/08/03 14:39:31 ingomierswa Exp $
Author:
Ingo Mierswa

Field Summary
private  java.lang.ClassLoader loader
           
private  java.lang.String prefix
           
static java.lang.String RESOURCE_PREFIX
          The prefix path for the resources directory.
 
Constructor Summary
ResourceSource(java.lang.ClassLoader loader)
           
ResourceSource(java.lang.ClassLoader loader, java.lang.String prefix)
           
 
Method Summary
 java.net.URL getResource(java.lang.String name)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

RESOURCE_PREFIX

public static final java.lang.String RESOURCE_PREFIX
The prefix path for the resources directory. Must be separated by '/' instead of File.separator!!!

See Also:
Constant Field Values


loader

private java.lang.ClassLoader loader

prefix

private java.lang.String prefix
Constructor Detail

ResourceSource

public ResourceSource(java.lang.ClassLoader loader)

ResourceSource

public ResourceSource(java.lang.ClassLoader loader,
                      java.lang.String prefix)
Method Detail

getResource

public java.net.URL getResource(java.lang.String name)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2001-2006