All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.coveo.feign.util.ClassUtils Maven / Gradle / Ivy

Go to download

A Feign reflection error decoder that eases the pain in rethrowing checked and unchecked exceptions.

There is a newer version: 3.1.1
Show newest version
package com.coveo.feign.util;

public class ClassUtils {
  private ClassUtils() {}

  public static boolean isSpringFrameworkAvailable() {
    return isClassAvailable(
        "org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider");
  }

  public static boolean isSpringWebAvailable() {
    return isClassAvailable("org.springframework.web.bind.annotation.RequestMapping");
  }

  public static boolean isClassAvailable(String fullyQualifiedName) {
    try {
      Class.forName(fullyQualifiedName);
      return true;
    } catch (Throwable e) {
    }
    return false;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy