public class OptionalDependencyWrapper extends Object
| Modifier and Type | Method and Description |
|---|---|
static <R> R |
wrapRunWithOptionalDependency(Supplier<R> supplier,
String message)
Runs the provided
Supplier implementation and catches any NoClassDefFoundError |
public static <R> R wrapRunWithOptionalDependency(Supplier<R> supplier, String message)
Supplier implementation and catches any NoClassDefFoundErrorR - type of suppliersupplier - implementation to safely runmessage - to display for caught exceptions (e.g. "Base64InputStream class is provided by
commons-codec"Copyright © 2015–2020 Red Hat. All rights reserved.