public final class TypeResult<T> extends Object
Modifier and Type | Method and Description |
---|---|
static TypeResult<Class<?>> |
forClass(Class<?> clazz) |
static TypeResult<Class<?>> |
forException(String name,
Throwable exception) |
static <V> TypeResult<V> |
forType(String name,
V type) |
T |
get() |
Throwable |
getException() |
T |
getOrFail() |
void |
ifPresent(Consumer<? super T> consumer) |
boolean |
isPresent() |
public static <V> TypeResult<V> forType(String name, V type)
public static TypeResult<Class<?>> forClass(Class<?> clazz)
public static TypeResult<Class<?>> forException(String name, Throwable exception)
public boolean isPresent()
public T get()
public Throwable getException()
public T getOrFail()