org.codehaus.groovy.grails.commons.spring
Class ReloadAwareAutowireCapableBeanFactory
java.lang.Object
org.springframework.core.SimpleAliasRegistry
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry
org.springframework.beans.factory.support.FactoryBeanRegistrySupport
org.springframework.beans.factory.support.AbstractBeanFactory
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
org.springframework.beans.factory.support.DefaultListableBeanFactory
org.codehaus.groovy.grails.commons.spring.ReloadAwareAutowireCapableBeanFactory
- All Implemented Interfaces:
- Serializable, BeanFactory, AutowireCapableBeanFactory, ConfigurableBeanFactory, ConfigurableListableBeanFactory, SingletonBeanRegistry, HierarchicalBeanFactory, ListableBeanFactory, BeanDefinitionRegistry, AliasRegistry
public class ReloadAwareAutowireCapableBeanFactory
- extends DefaultListableBeanFactory
A BeanFactory that can deal with class cast exceptions that may occur due to class reload events and then
attempt to reload the bean being instantiated to avoid them.
Caches autowiring for beans (mainly controllers & domain class instances). Bypasses autowiring if there are no beans for the properties in the class.
Caching is only used in environments where reloading is not enabled.
- Since:
- 1.1.1
Created: May 8, 2009
- Author:
- Graeme Rocher
- See Also:
- Serialized Form
Methods inherited from class org.springframework.beans.factory.support.DefaultListableBeanFactory |
allowAliasOverriding, containsBeanDefinition, copyConfigurationFrom, determinePrimaryCandidate, doResolveDependency, findAnnotationOnBean, findAutowireCandidates, freezeConfiguration, getAutowireCandidateResolver, getBean, getBeanDefinition, getBeanDefinitionCount, getBeanDefinitionNames, getBeanNamesForType, getBeanNamesForType, getBeansOfType, getBeansOfType, getBeansWithAnnotation, isAutowireCandidate, isAutowireCandidate, isBeanEligibleForMetadataCaching, isConfigurationFrozen, isPrimary, matchesBeanName, preInstantiateSingletons, registerBeanDefinition, registerResolvableDependency, removeBeanDefinition, resetBeanDefinition, resolveDependency, setAllowBeanDefinitionOverriding, setAllowEagerClassLoading, setAutowireCandidateResolver, setSerializationId, toString, writeReplace |
Methods inherited from class org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory |
applyBeanPostProcessorsAfterInitialization, applyBeanPostProcessorsBeforeInitialization, applyBeanPostProcessorsBeforeInstantiation, applyBeanPropertyValues, applyMergedBeanDefinitionPostProcessors, applyPropertyValues, autowire, autowireBean, autowireByType, autowireConstructor, checkDependencies, configureBean, createBean, createBean, createBean, createBeanInstance, determineConstructorsFromBeanPostProcessors, filterPropertyDescriptorsForDependencyCheck, getEarlyBeanReference, getInstantiationStrategy, getParameterNameDiscoverer, getTypeForFactoryBean, getTypeForFactoryMethod, ignoreDependencyInterface, ignoreDependencyType, initializeBean, initializeBean, instantiateBean, instantiateUsingFactoryMethod, invokeCustomInitMethod, invokeInitMethods, populateBean, postProcessObjectFromFactoryBean, predictBeanType, removeSingleton, resolveBeforeInstantiation, resolveDependency, setAllowCircularReferences, setAllowRawInjectionDespiteWrapping, setInstantiationStrategy, setParameterNameDiscoverer, unsatisfiedNonSimpleProperties |
Methods inherited from class org.springframework.beans.factory.support.AbstractBeanFactory |
addBeanPostProcessor, addEmbeddedValueResolver, addPropertyEditorRegistrar, afterPrototypeCreation, beforePrototypeCreation, checkMergedBeanDefinition, clearMergedBeanDefinition, containsBean, containsLocalBean, copyRegisteredEditorsTo, destroyBean, destroyBean, destroyScopedBean, doGetBean, evaluateBeanDefinitionString, getAccessControlContext, getAliases, getBean, getBean, getBean, getBean, getBeanClassLoader, getBeanExpressionResolver, getBeanPostProcessorCount, getBeanPostProcessors, getConversionService, getCustomEditors, getCustomTypeConverter, getMergedBeanDefinition, getMergedBeanDefinition, getMergedBeanDefinition, getMergedLocalBeanDefinition, getObjectForBeanInstance, getParentBeanFactory, getPropertyEditorRegistrars, getRegisteredScope, getRegisteredScopeNames, getTempClassLoader, getType, getTypeConverter, hasDestructionAwareBeanPostProcessors, hasInstantiationAwareBeanPostProcessors, initBeanWrapper, isBeanNameInUse, isCacheBeanMetadata, isCurrentlyInCreation, isFactoryBean, isFactoryBean, isPrototype, isPrototypeCurrentlyInCreation, isSingleton, isTypeMatch, markBeanAsCreated, originalBeanName, registerCustomEditor, registerCustomEditors, registerDisposableBeanIfNecessary, registerScope, removeSingletonIfCreatedForTypeCheckOnly, requiresDestruction, resolveBeanClass, resolveEmbeddedValue, setBeanClassLoader, setBeanExpressionResolver, setCacheBeanMetadata, setConversionService, setParentBeanFactory, setSecurityContextProvider, setTempClassLoader, setTypeConverter, transformedBeanName |
Methods inherited from class org.springframework.beans.factory.support.DefaultSingletonBeanRegistry |
addSingleton, addSingletonFactory, afterSingletonCreation, beforeSingletonCreation, containsSingleton, destroyBean, destroySingleton, destroySingletons, getDependenciesForBean, getDependentBeans, getSingleton, getSingleton, getSingleton, getSingletonCount, getSingletonMutex, getSingletonNames, hasDependentBean, isSingletonCurrentlyInCreation, onSuppressedException, registerContainedBean, registerDependentBean, registerDisposableBean, registerSingleton |
Methods inherited from interface org.springframework.beans.factory.config.ConfigurableBeanFactory |
addBeanPostProcessor, addEmbeddedValueResolver, addPropertyEditorRegistrar, copyRegisteredEditorsTo, destroyBean, destroyScopedBean, destroySingletons, getAccessControlContext, getBeanClassLoader, getBeanExpressionResolver, getBeanPostProcessorCount, getConversionService, getDependenciesForBean, getDependentBeans, getMergedBeanDefinition, getRegisteredScope, getRegisteredScopeNames, getTempClassLoader, getTypeConverter, isCacheBeanMetadata, isCurrentlyInCreation, isFactoryBean, registerAlias, registerCustomEditor, registerDependentBean, registerScope, resolveAliases, resolveEmbeddedValue, setBeanClassLoader, setBeanExpressionResolver, setCacheBeanMetadata, setConversionService, setParentBeanFactory, setTempClassLoader, setTypeConverter |
autowiringByNameCacheForClass
ConcurrentHashMap<Class,Set<String>> autowiringByNameCacheForClass
autowiringBeanPropertiesFlag
ThreadLocal<Boolean> autowiringBeanPropertiesFlag
ReloadAwareAutowireCapableBeanFactory
public ReloadAwareAutowireCapableBeanFactory()
doCreateBean
protected Object doCreateBean(String beanName,
RootBeanDefinition mbd,
Object[] args)
- Overrides:
doCreateBean
in class AbstractAutowireCapableBeanFactory
isExcludedFromDependencyCheck
protected boolean isExcludedFromDependencyCheck(PropertyDescriptor pd)
- Overrides:
isExcludedFromDependencyCheck
in class AbstractAutowireCapableBeanFactory
autowireBeanProperties
public void autowireBeanProperties(Object existingBean,
int autowireMode,
boolean dependencyCheck)
throws BeansException
- Specified by:
autowireBeanProperties
in interface AutowireCapableBeanFactory
- Overrides:
autowireBeanProperties
in class AbstractAutowireCapableBeanFactory
- Throws:
BeansException
autowireByName
protected void autowireByName(String beanName,
AbstractBeanDefinition mbd,
BeanWrapper bw,
MutablePropertyValues pvs)
- Overrides:
autowireByName
in class AbstractAutowireCapableBeanFactory
Copyright (c) 2005-2009 The Grails project