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
InstanceFactory
getInstance
in interface InstanceFactory
className
- name of class.ClassNotFoundException
- if the class does not exist.public Object getInstance(String className, ClassLoader classLoader) throws ClassNotFoundException
InstanceFactory
getInstance
in interface InstanceFactory
className
- name of class.classLoader
- class loader.ClassNotFoundException
- if the class does not exist.public <T> T getInstance(Class<T> clazz)
InstanceFactory
getInstance
in interface InstanceFactory
T
- type of class.clazz
- class.public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException
setApplicationContext
in interface org.springframework.context.ApplicationContextAware
org.springframework.beans.BeansException
Copyright © 2019 Atlassian. All rights reserved.