com.societegenerale.commons.plugin.utils.ReflectionException Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of arch-unit-build-plugin-core Show documentation
Show all versions of arch-unit-build-plugin-core Show documentation
The core logic for Maven or Gradle ArchUnit plugin
package com.societegenerale.commons.plugin.utils;
import java.lang.reflect.InvocationTargetException;
class ReflectionException extends RuntimeException {
private ReflectionException(Throwable throwable) {
super(throwable.getMessage(), throwable);
}
static ReflectionException wrap(Exception throwable) {
return throwable instanceof InvocationTargetException
? new ReflectionException(((InvocationTargetException) throwable).getTargetException())
: new ReflectionException(throwable);
}
}