org.oddjob.util
Class URLClassLoaderType

java.lang.Object
  extended by org.oddjob.util.URLClassLoaderType
All Implemented Interfaces:
ArooaValue, ValueFactory<ClassLoader>

public class URLClassLoaderType
extends Object
implements ValueFactory<ClassLoader>

Description

A simple wrapper for URLClassloader.

Example

A simple example. A single directory is added to the class path.
<oddjob id="this">
    <job>
        <oddjob id="nested" file="${this.dir}/URLClassLoaderInner.xml">
            <classLoader>
                <url-class-loader>
                    <files>
                        <file file="${this.args[0]}/test/classloader"/>
                    </files>
                </url-class-loader>
            </classLoader>
        </oddjob>
    </job>
</oddjob>
Author:
rob

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.oddjob.arooa.types.ValueFactory
ValueFactory.Conversions
 
Constructor Summary
URLClassLoaderType()
           
 
Method Summary
 File[] getFiles()
           
 ClassLoader getParent()
           
 URL[] getUrls()
           
 boolean isNoInherit()
           
 void setFiles(File[] files)
           
 void setNoInherit(boolean noInherit)
           
 void setParent(ClassLoader parent)
           
 void setUrls(URL[] urls)
           
 String toString()
           
 ClassLoader toValue()
          Provide an instance of the type this is a factory for.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

URLClassLoaderType

public URLClassLoaderType()
Method Detail

toValue

public ClassLoader toValue()
Description copied from interface: ValueFactory
Provide an instance of the type this is a factory for.

Specified by:
toValue in interface ValueFactory<ClassLoader>
Returns:
An instance of the type. May be null.

getUrls

public URL[] getUrls()

setUrls

public void setUrls(URL[] urls)

Property: urls

Description: URLs to add to the classpath.

Required: No.


getFiles

public File[] getFiles()

setFiles

public void setFiles(File[] files)

Property: files

Description: Files to add to the classpath.

Required: No.


isNoInherit

public boolean isNoInherit()

setNoInherit

public void setNoInherit(boolean noInherit)

Property: noInherit

Description: Don't inherit the parent class loader.

Required: No.


getParent

public ClassLoader getParent()

setParent

@Inject
public void setParent(ClassLoader parent)

Property: parent

Description: The parent class loader to inherit.

Required: No, defaults to any existing Oddjob class loader.


toString

public String toString()
Overrides:
toString in class Object