Java Code Examples for org.springframework.beans.factory.config.DependencyDescriptor#isRequired()

The following examples show how to use org.springframework.beans.factory.config.DependencyDescriptor#isRequired() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SimpleAutowireCandidateResolver.java    From spring-analysis-note with MIT License 4 votes vote down vote up
@Override
public boolean isRequired(DependencyDescriptor descriptor) {
	return descriptor.isRequired();
}
 
Example 2
Source File: SimpleAutowireCandidateResolver.java    From java-technology-stack with MIT License 4 votes vote down vote up
@Override
public boolean isRequired(DependencyDescriptor descriptor) {
	return descriptor.isRequired();
}
 
Example 3
Source File: DefaultListableBeanFactory.java    From lams with GNU General Public License v2.0 4 votes vote down vote up
private boolean isRequired(DependencyDescriptor descriptor) {
	AutowireCandidateResolver resolver = getAutowireCandidateResolver();
	return (resolver instanceof SimpleAutowireCandidateResolver ?
			((SimpleAutowireCandidateResolver) resolver).isRequired(descriptor) :
			descriptor.isRequired());
}
 
Example 4
Source File: AutowireCandidateResolver.java    From spring-analysis-note with MIT License 2 votes vote down vote up
/**
 * Determine whether the given descriptor is effectively required.
 * <p>The default implementation checks {@link DependencyDescriptor#isRequired()}.
 * @param descriptor the descriptor for the target method parameter or field
 * @return whether the descriptor is marked as required or possibly indicating
 * non-required status some other way (e.g. through a parameter annotation)
 * @since 5.0
 * @see DependencyDescriptor#isRequired()
 */
default boolean isRequired(DependencyDescriptor descriptor) {
	return descriptor.isRequired();
}
 
Example 5
Source File: AutowireCandidateResolver.java    From java-technology-stack with MIT License 2 votes vote down vote up
/**
 * Determine whether the given descriptor is effectively required.
 * <p>The default implementation checks {@link DependencyDescriptor#isRequired()}.
 * @param descriptor the descriptor for the target method parameter or field
 * @return whether the descriptor is marked as required or possibly indicating
 * non-required status some other way (e.g. through a parameter annotation)
 * @since 5.0
 * @see DependencyDescriptor#isRequired()
 */
default boolean isRequired(DependencyDescriptor descriptor) {
	return descriptor.isRequired();
}
 
Example 6
Source File: SimpleAutowireCandidateResolver.java    From lams with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Determine whether the given descriptor is effectively required.
 * <p>The default implementation checks {@link DependencyDescriptor#isRequired()}.
 * @param descriptor the descriptor for the target method parameter or field
 * @return whether the descriptor is marked as required or possibly indicating
 * non-required status some other way (e.g. through a parameter annotation)
 * @since 4.3.9
 * @see DependencyDescriptor#isRequired()
 */
public boolean isRequired(DependencyDescriptor descriptor) {
	return descriptor.isRequired();
}