public class SpringContextInstanceFactory extends Object implements InstanceFactory, org.springframework.context.ApplicationContextAware
| Constructor and Description |
|---|
SpringContextInstanceFactory() |
| Modifier and Type | Method and Description |
|---|---|
<T> T |
getInstance(Class<T> clazz)
Gets an instance of a class.
|
Object |
getInstance(String className)
Get an instance of a class.
|
Object |
getInstance(String className,
ClassLoader classLoader)
Get an instance of a class from a specific classloader.
|
void |
setApplicationContext(org.springframework.context.ApplicationContext applicationContext) |
public Object getInstance(String className) throws ClassNotFoundException
InstanceFactorygetInstance in interface InstanceFactoryclassName - name of class.ClassNotFoundException - if the class does not exist.public Object getInstance(String className, ClassLoader classLoader) throws ClassNotFoundException
InstanceFactorygetInstance in interface InstanceFactoryclassName - name of class.classLoader - class loader.ClassNotFoundException - if the class does not exist.public <T> T getInstance(Class<T> clazz)
InstanceFactorygetInstance in interface InstanceFactoryT - type of class.clazz - class.public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
throws org.springframework.beans.BeansException
setApplicationContext in interface org.springframework.context.ApplicationContextAwareorg.springframework.beans.BeansExceptionCopyright © 2017 Atlassian. All rights reserved.