Class LightConditionalOnBean

  • All Implemented Interfaces:
    org.springframework.context.annotation.Condition
    Direct Known Subclasses:
    LightConditionalOnMissingBean

    public class LightConditionalOnBean
    extends java.lang.Object
    implements org.springframework.context.annotation.Condition
    Conditional that only matches when beans meeting all the specified requirements are already contained in the BeanFactory. All the requirements must be met for the condition to match, but they do not have to be met by the same bean.

    Similar to Spring-Boot annotation without spring-boot dependencies {link org.springframework.boot.autoconfigure.condition.ConditionalOnBean}

    Since:
    1.0.1
    See Also:
    Spring-Boot annotation javadoc
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.String beanName  
    • Constructor Summary

      Constructors 
      Constructor Description
      LightConditionalOnBean​(java.lang.String beanName)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean matches​(org.springframework.context.annotation.ConditionContext conditionContext, org.springframework.core.type.AnnotatedTypeMetadata annotatedTypeMetadata)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • beanName

        private final java.lang.String beanName
    • Constructor Detail

      • LightConditionalOnBean

        public LightConditionalOnBean​(java.lang.String beanName)
    • Method Detail

      • matches

        public boolean matches​(org.springframework.context.annotation.ConditionContext conditionContext,
                               org.springframework.core.type.AnnotatedTypeMetadata annotatedTypeMetadata)
        Specified by:
        matches in interface org.springframework.context.annotation.Condition