Package com.axelor.common.reflections
Class Reflections
- java.lang.Object
-
- com.axelor.common.reflections.Reflections
-
public final class Reflections extends Object
TheReflections
utilities provides fast and easy way to search for resources and types.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ResourceFinder
findResources()
Return aResourceFinder
to search for resources.static ResourceFinder
findResources(ClassLoader loader)
Return aResourceFinder
to search for resources.static <T> ClassFinder<T>
findSubTypesOf(Class<T> type)
Return aClassFinder
to search for the sub types of the given type.static <T> ClassFinder<T>
findSubTypesOf(Class<T> type, ClassLoader loader)
Return aClassFinder
to search for the sub types of the given type.static ClassFinder<?>
findTypes()
Return aClassFinder
to search for types.static ClassFinder<?>
findTypes(ClassLoader loader)
Return aClassFinder
to search for types.
-
-
-
Method Detail
-
findSubTypesOf
public static <T> ClassFinder<T> findSubTypesOf(Class<T> type, ClassLoader loader)
Return aClassFinder
to search for the sub types of the given type.- Type Parameters:
T
- the type to search- Parameters:
type
- the super typeloader
- find with the givenClassLoader
- Returns:
- an instance of
ClassFinder
-
findSubTypesOf
public static <T> ClassFinder<T> findSubTypesOf(Class<T> type)
Return aClassFinder
to search for the sub types of the given type.- Type Parameters:
T
- the type to search- Parameters:
type
- the super type- Returns:
- an instance of
ClassFinder
-
findTypes
public static ClassFinder<?> findTypes(ClassLoader loader)
Return aClassFinder
to search for types.- Parameters:
loader
- find with the givenClassLoader
- Returns:
- an instance of
ClassFinder
-
findTypes
public static ClassFinder<?> findTypes()
Return aClassFinder
to search for types.- Returns:
- an instance of
ClassFinder
-
findResources
public static ResourceFinder findResources(ClassLoader loader)
Return aResourceFinder
to search for resources.- Parameters:
loader
- find with the givenClassLoader
- Returns:
- an instance of
ResourceFinder
-
findResources
public static ResourceFinder findResources()
Return aResourceFinder
to search for resources.- Returns:
- an instance of
ResourceFinder
-
-