Class ClassesRelated
- java.lang.Object
-
- net.splitcells.dem.utils.reflection.ClassesRelated
-
public class ClassesRelated extends Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static List<Class<?>>
allClasses()
static List<Class<?>>
allClassesOf(String packageName)
static Class<?>
callerClass()
static Class<?>
callerClass(int i)
static <T> Optional<T>
downCast(Class<T> type, Object arg)
static boolean
isSubClass(Class<?> superClass, Class<?> subClass)
static String
resourceOfClass(Class<?> clazz, String resourceName)
Loads the resources of a class, typically located in the src/main/resources of the projects source.static String
simplifiedName(Class<?> arg)
-
-
-
Method Detail
-
callerClass
public static Class<?> callerClass()
-
callerClass
public static Class<?> callerClass(int i)
-
resourceOfClass
public static String resourceOfClass(Class<?> clazz, String resourceName)
Loads the resources of a class, typically located in the src/main/resources of the projects source. Note that only the resources of {@param clazz}'s project will be ready. If there is a project with the same {@param resourceName} in the same package, this resource is ignored.- Parameters:
clazz
-resourceName
-- Returns:
-
-