Package org.openstreetmap.josm.tools
Class ReflectionUtils
java.lang.Object
org.openstreetmap.josm.tools.ReflectionUtils
Reflection utilities.
- Since:
- 14977
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static <T> TfindCaller(Function<StackTraceElement, T> getter, Collection<T> exclusions) static Class<?>findCallerClass(Collection<Class<?>> exclusions) To use from a method to know which class called it.static Class<?>Find a class either in the default class loader or in plugins.static voidsetObjectsAccessible(AccessibleObject... objects) SetsAccessibleObject(s) accessible.
-
Constructor Details
-
ReflectionUtils
private ReflectionUtils()
-
-
Method Details
-
setObjectsAccessible
SetsAccessibleObject(s) accessible.- Parameters:
objects- objects- See Also:
-
findCallerClass
To use from a method to know which class called it.- Parameters:
exclusions- classes to exclude from the search. Can be null- Returns:
- the first calling class not present in
exclusions
-
findClass
Find a class either in the default class loader or in plugins.- Parameters:
name- class name to search- Returns:
- found class object, or null if it was not found
- Since:
- 19597
-
findCaller
-