Uses of Class
org.junit.platform.commons.function.Try
Packages that use Try
Package
Description
Maintained functional interfaces and support classes.
Maintained common support APIs provided by the JUnit Platform.
Internal common utilities for JUnit.
-
Uses of Try in org.junit.platform.commons.function
Methods in org.junit.platform.commons.function that return TryModifier and TypeMethodDescriptionabstract <U> Try<U> If thisTryis a success, apply the supplied function to its value and return the resultingTry; if thisTryis a failure, do nothing.abstract <U> Try<U> Try.andThenTry(Try.Transformer<V, U> transformer) If thisTryis a success, apply the supplied transformer to its value and return a new successful or failedTrydepending on the transformer's outcome; if thisTryis a failure, do nothing.static <V> Try<V> Call the suppliedCallableand return a successfulTrythat contains the returned value or, in case an exception was thrown, a failedTrythat contains the exception.static <V> Try<V> Convert the supplied exception into a failedTry.If thisTryis a failure, call the suppliedConsumerwith the contained exception; otherwise, do nothing.If thisTryis a success, call the suppliedConsumerwith the contained value; otherwise, do nothing.If thisTryis a failure, call the supplied supplier and return the resultingTry; if thisTryis a success, do nothing.If thisTryis a failure, call the supplied action and return a new successful or failedTrydepending on the action's outcome; if thisTryis a success, do nothing.static <V> Try<V> Try.success(V value) Convert the supplied value into a succeededTry.Method parameters in org.junit.platform.commons.function with type arguments of type TryModifier and TypeMethodDescriptionabstract <U> Try<U> If thisTryis a success, apply the supplied function to its value and return the resultingTry; if thisTryis a failure, do nothing.If thisTryis a failure, call the supplied supplier and return the resultingTry; if thisTryis a success, do nothing. -
Uses of Try in org.junit.platform.commons.support
Methods in org.junit.platform.commons.support that return TryModifier and TypeMethodDescriptionReflectionSupport.tryToLoadClass(String name) Try to load a class by its primitive name or fully qualified name, using the defaultClassLoader.ReflectionSupport.tryToLoadClass(String name, ClassLoader classLoader) Try to load a class by its primitive name or fully qualified name, using the suppliedClassLoader.ReflectionSupport.tryToReadFieldValue(Field field, Object instance) Try to read the value of a potentially inaccessible field. -
Uses of Try in org.junit.platform.commons.util
Methods in org.junit.platform.commons.util that return TryModifier and TypeMethodDescriptionReflectionUtils.tryToGetMethod(Class<?> clazz, String methodName, Class<?>... parameterTypes) Try to get theMethodin the specified class with the specified name and parameter types.ReflectionUtils.tryToLoadClass(String name) ReflectionUtils.tryToLoadClass(String name, ClassLoader classLoader) Try to load a class by its primitive name or fully qualified name, using the suppliedClassLoader.ReflectionUtils.tryToReadFieldValue(Class<T> clazz, String fieldName, T instance) Try to read the value of a potentially inaccessible or nonexistent field.ReflectionUtils.tryToReadFieldValue(Field field) Try to read the value of a potentially inaccessible static field.ReflectionUtils.tryToReadFieldValue(Field field, Object instance)