Example usage for org.springframework.context.annotation Condition matches

List of usage examples for org.springframework.context.annotation Condition matches

Introduction

In this page you can find the example usage for org.springframework.context.annotation Condition matches.

Prototype

boolean matches(ConditionContext context, AnnotatedTypeMetadata metadata);

Source Link

Document

Determine if the condition matches.

Usage

From source file:lodsve.core.condition.SpringBootCondition.java

/**
 * Return true if any of the specified condition matches.
 *
 * @param context   the context//from  w w  w. j  av  a2 s.co  m
 * @param metadata  the annotation meta-data
 * @param condition condition to test
 * @return {@code true} if the condition matches.
 */
protected final boolean matches(ConditionContext context, AnnotatedTypeMetadata metadata, Condition condition) {
    if (condition instanceof SpringBootCondition) {
        return ((SpringBootCondition) condition).getMatchOutcome(context, metadata).isMatch();
    }
    return condition.matches(context, metadata);
}