Commons Lang
The standard Java libraries fail to provide enough methods for manipulation of its core classes. Apache Commons Lang provides these extra methods.
Lang provides a host of helper utilities for the java.lang API, notably String manipulation methods, basic numerical methods, object reflection, concurrency, creation and serialization and System properties. Additionally it contains basic enhancements to java.util.Date and a series of utilities dedicated to help with building methods, such as hashCode, toString and equals
@Override public boolean isAutowireCandidate(BeanDefinitionHolder bdHolder, DependencyDescriptor descriptor) {
if (!bdHolder.getBeanDefinition().isAutowireCandidate()) {
// if explicitly false, do not proceed with any other checks
return false;
}
return (descriptor == null || checkGenericTypeMatch(bdHolder, descriptor));
}
containsBeanDefinition(String beanName)
Check if this bean factory contains a bean definition with the given name.
findAnnotationOnBean(String beanName, Class<A> annotationType)
Find a Annotation of annotationType on the specified bean, traversing its interfaces and super classes if no annotation can be found on the given class itself.
getBeanDefinitionCount()
Return the number of beans defined in the factory.
getBeanDefinitionNames()
Return the names of all beans defined in this factory.
getBeanNamesForType(Class<?> type)
Return the names of beans matching the given type (including subclasses), judging from either bean definitions or the value of getObjectType in the case of FactoryBeans.
getBeanNamesForType(Class<?> type, boolean includeNonSingletons, boolean allowEagerInit)
Return the names of beans matching the given type (including subclasses), judging from either bean definitions or the value of getObjectType in the case of FactoryBeans.
getBeansOfType(Class<T> type)
Return the bean instances that match the given object type (including subclasses), judging from either bean definitions or the value of getObjectType in the case of FactoryBeans.
getBeansOfType(Class<T> type, boolean includeNonSingletons, boolean allowEagerInit)
Return the bean instances that match the given object type (including subclasses), judging from either bean definitions or the value of getObjectType in the case of FactoryBeans.
getBeansWithAnnotation(Class<? extends Annotation> annotationType)
Find all beans whose Class has the supplied Annotation type.
void freezeConfiguration()
Freeze all bean definitions, signalling that the registered bean definitions will not be modified or post-processed any further.
BeanDefinition getBeanDefinition(String beanName)
Return the registered BeanDefinition for the specified bean, allowing access to its property values and constructor argument value (which can be modified during bean factory post-processing).
void ignoreDependencyInterface(Class<?> ifc)
Ignore the given dependency interface for autowiring.
void ignoreDependencyType(Class<?> type)
Ignore the given dependency type for autowiring: for example, String.
boolean isAutowireCandidate(String beanName, DependencyDescriptor descriptor)
Determine whether the specified bean qualifies as an autowire candidate, to be injected into other beans which declare a dependency of matching type.
boolean isConfigurationFrozen()
Return whether this factory's bean definitions are frozen, i.e.
void preInstantiateSingletons()
Ensure that all non-lazy-init singletons are instantiated, also considering FactoryBeans.
void registerResolvableDependency(Class<?> dependencyType, Object autowiredValue)
Register a special dependency type with corresponding autowired value.
boolean containsBeanDefinition(String beanName)
Check if this registry contains a bean definition with the given name.
BeanDefinition getBeanDefinition(String beanName)
Return the BeanDefinition for the given bean name.
int getBeanDefinitionCount()
Return the number of beans defined in the registry.
String[] getBeanDefinitionNames()
Return the names of all beans defined in this registry.
boolean isBeanNameInUse(String beanName)
Determine whether the given bean name is already in use within this registry, i.e.
void registerBeanDefinition(String beanName, BeanDefinition beanDefinition)
Register a new bean definition with this registry.
void removeBeanDefinition(String beanName)
Remove the BeanDefinition for the given name.