Search in sources :

Example 1 with Range

use of org.springframework.boot.autoconfigure.condition.ConditionalOnJava.Range in project spring-boot by spring-projects.

the class OnJavaCondition method getMatchOutcome.

@Override
public ConditionOutcome getMatchOutcome(ConditionContext context, AnnotatedTypeMetadata metadata) {
    Map<String, Object> attributes = metadata.getAnnotationAttributes(ConditionalOnJava.class.getName());
    Range range = (Range) attributes.get("range");
    JavaVersion version = (JavaVersion) attributes.get("value");
    return getMatchOutcome(range, JVM_VERSION, version);
}
Also used : Range(org.springframework.boot.autoconfigure.condition.ConditionalOnJava.Range) JavaVersion(org.springframework.boot.system.JavaVersion)

Aggregations

Range (org.springframework.boot.autoconfigure.condition.ConditionalOnJava.Range)1 JavaVersion (org.springframework.boot.system.JavaVersion)1