public class GroovyContext extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
GroovyContext.GroovyClassInstantiationFailed |
static class |
GroovyContext.GroovyInstanceNotFound |
| Constructor and Description |
|---|
GroovyContext() |
GroovyContext(groovy.lang.GroovyClassLoader classLoader,
GroovyResourceFinder resourceFinder) |
GroovyContext(groovy.lang.GroovyClassLoader classLoader,
List<String> resources) |
GroovyContext(GroovyResourceFinder resourceFinder) |
GroovyContext(List<String> resources) |
| Modifier and Type | Method and Description |
|---|---|
<T> T |
getInstanceOfType(Class<T> type) |
List<Object> |
getInstances() |
Object |
newInstance(Class<?> parsedClass)
Creates an instance from the parsed Groovy class.
|
Object |
newInstance(String resource)
Creates an object instance from the Groovy resource
|
public GroovyContext()
public GroovyContext(GroovyResourceFinder resourceFinder)
public GroovyContext(groovy.lang.GroovyClassLoader classLoader,
GroovyResourceFinder resourceFinder)
public <T> T getInstanceOfType(Class<T> type)
public Object newInstance(String resource)
resource - the Groovy resource to parsepublic Object newInstance(Class<?> parsedClass) throws Exception
parsedClass - the parsed Class to instantiateException - if instantiation or injection failsCopyright © 2003-2013. All Rights Reserved.