org.jbehave.core.configuration.groovy
Class GroovyContext
java.lang.Object
org.jbehave.core.configuration.groovy.GroovyContext
public class GroovyContext
- extends Object
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GroovyContext
public GroovyContext()
GroovyContext
public GroovyContext(GroovyResourceFinder resourceFinder)
GroovyContext
public GroovyContext(List<String> resources)
GroovyContext
public GroovyContext(groovy.lang.GroovyClassLoader classLoader,
GroovyResourceFinder resourceFinder)
GroovyContext
public GroovyContext(groovy.lang.GroovyClassLoader classLoader,
List<String> resources)
getInstances
public List<Object> getInstances()
getInstanceOfType
public <T> T getInstanceOfType(Class<T> type)
newInstance
public Object newInstance(String resource)
- Creates an object instance from the Groovy resource
- Parameters:
resource
- the Groovy resource to parse
- Returns:
- An Object instance
newInstance
public Object newInstance(Class<?> parsedClass)
throws Exception
- Creates an instance from the parsed Groovy class. This method can be
overriden to do some dependency injection on Groovy classes.
- Parameters:
parsedClass
- the parsed Class to instantiate
- Returns:
- An Object instance of the parsed Class
- Throws:
Exception
- if instantiation or injection fails
Copyright © 2003-2011. All Rights Reserved.