org.jbehave.core
Class StoryClassLoader

java.lang.Object
  extended by java.lang.ClassLoader
      extended by java.security.SecureClassLoader
          extended by java.net.URLClassLoader
              extended by org.jbehave.core.StoryClassLoader

public class StoryClassLoader
extends URLClassLoader

Extends URLClassLoader to instantiate RunnableStory instances.

Author:
Mauro Talevi

Constructor Summary
StoryClassLoader(List<String> classpathElements)
           
StoryClassLoader(List<String> classpathElements, ClassLoader parent)
           
 
Method Summary
 RunnableStory newStory(String storyClassName, Class<?>... parameterTypes)
          Loads and instantiates a runnable story class
 String toString()
           
 
Methods inherited from class java.net.URLClassLoader
addURL, definePackage, findClass, findResource, findResources, getPermissions, getURLs, newInstance, newInstance
 
Methods inherited from class java.security.SecureClassLoader
defineClass, defineClass
 
Methods inherited from class java.lang.ClassLoader
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findLibrary, findLoadedClass, findSystemClass, getPackage, getPackages, getParent, getResource, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, loadClass, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StoryClassLoader

public StoryClassLoader(List<String> classpathElements)
                 throws MalformedURLException
Throws:
MalformedURLException

StoryClassLoader

public StoryClassLoader(List<String> classpathElements,
                        ClassLoader parent)
                 throws MalformedURLException
Throws:
MalformedURLException
Method Detail

newStory

public RunnableStory newStory(String storyClassName,
                              Class<?>... parameterTypes)
Loads and instantiates a runnable story class

Parameters:
storyClassName - the name of the story class
parameterTypes - the types of the constructor used to instantiate core class
Returns:
A RunnableStory instance

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2003-2010. All Rights Reserved.