Uses of Class
org.junit.platform.commons.function.Try
Packages that use Try
Package
Description
Functional interfaces and support classes.
Common support APIs provided by the JUnit Platform.
Classpath scanning 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.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.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.tryToGetResources(String classpathResourceName) Try to get the resources for the supplied classpath resource name.ReflectionSupport.tryToGetResources(String classpathResourceName, ClassLoader classLoader) Try to load the resources for the supplied classpath resource name, using the suppliedClassLoader.ReflectionSupport.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, @Nullable Object instance) Try to read the value of a potentially inaccessible field. -
Uses of Try in org.junit.platform.commons.support.scanning
Constructor parameters in org.junit.platform.commons.support.scanning with type arguments of type TryModifierConstructorDescriptionDefaultClasspathScanner(Supplier<ClassLoader> classLoaderSupplier, BiFunction<String, ClassLoader, Try<Class<?>>> loadClass) -
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<?> @Nullable ... parameterTypes) Try to get theMethodin the specified class with the specified name and parameter types.ReflectionUtils.tryToGetResources(String classpathResourceName) Try to get resources by their name, using theClassLoaderUtils.getDefaultClassLoader().ReflectionUtils.tryToGetResources(String classpathResourceName, ClassLoader classLoader) Try to get resources by their name, using the suppliedClassLoader.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, @Nullable 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, @Nullable Object instance)