- java.lang.Object
-
- com.mscharhag.et.ET
-
public final class ET extends java.lang.ObjectGlobal factory that can be used to create newExceptionTranslatorconfigurations usingET.newConfiguration().Usage:
ExceptionTranslator et = ET.newConfiguration() // Exception translator configuration .translate(FooException.class).to(MyRuntimeException.class) .translate(BazException.class).using(OtherException::new) .translate(BarException.class).using((message, exception) -> { .. }) .done(); // Create ExceptionTranslator from configuration
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ExceptionTranslatorConfigurernewConfiguration()Returns a newExceptionTranslatorConfigurerthat can be used to create a newExceptionTranslatorconfiguration.
-
-
-
Method Detail
-
newConfiguration
public static ExceptionTranslatorConfigurer newConfiguration()
Returns a newExceptionTranslatorConfigurerthat can be used to create a newExceptionTranslatorconfiguration.- Returns:
- an
ExceptionTranslatorConfigurer, nevernull
-
-