class OnMissingBeanCondition extends SpringBootCondition implements ConfigurationCondition {


    /** {@inheritDoc} */
    @Override
    public ConditionOutcome getMatchOutcome(ConditionContext context, AnnotatedTypeMetadata metadata) {<FILL_FUNCTION_BODY>}

    /** {@inheritDoc} */
    @Override
    public ConfigurationPhase getConfigurationPhase() {
        return ConfigurationPhase.REGISTER_BEAN;
    }
}

        Map<String, Object> beanAttributes = metadata.getAnnotationAttributes(Bean.class.getName());
        String beanName = ((String[]) beanAttributes.get("name"))[0];
        if(!StringUtils.hasLength(beanName)) {
            throw new IllegalStateException("OnMissingBeanCondition can't detect bean name!");
        }
        boolean missingBean = !context.getBeanFactory().containsBean(context.getEnvironment().resolveRequiredPlaceholders(beanName));
        return missingBean ? ConditionOutcome.match(beanName + " not found") : ConditionOutcome.noMatch(beanName + " found");
    
<methods>public void <init>() ,public abstract org.springframework.boot.autoconfigure.condition.ConditionOutcome getMatchOutcome(org.springframework.context.annotation.ConditionContext, org.springframework.core.type.AnnotatedTypeMetadata) ,public final boolean matches(org.springframework.context.annotation.ConditionContext, org.springframework.core.type.AnnotatedTypeMetadata) <variables>private final org.apache.commons.logging.Log logger