public final class Classes extends Object
Modifier and Type | Method and Description |
---|---|
static String |
name(Class<?> c)
Gets the name of the given class or null if the class is null.
|
static Class<?> |
relativeClass(Class<?> scope,
String path)
Takes a Class and a relative path to a class and returns any class at that relative path.
|
static String |
simpleName(Class<?> c)
Gets the simple name (without the package) of the given class or null if the class is null.
|
public static String name(Class<?> c)
c
- The classpublic static String simpleName(Class<?> c)
c
- The classpublic static Class<?> relativeClass(Class<?> scope, String path) throws ClassNotFoundException
scope
- The package to start atpath
- The relative path to the classClassNotFoundException
Copyright © 2006–2022 Apache Software Foundation. All rights reserved.