Package org.apache.wicket.util.lang
Class Classes
- java.lang.Object
-
- org.apache.wicket.util.lang.Classes
-
public final class Classes extends java.lang.ObjectUtilities for dealing with classes.- Author:
- Jonathan Locke
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.Stringname(java.lang.Class<?> c)Gets the name of the given class or null if the class is null.static java.lang.Class<?>relativeClass(java.lang.Class<?> scope, java.lang.String path)Takes a Class and a relative path to a class and returns any class at that relative path.static java.lang.StringsimpleName(java.lang.Class<?> c)Gets the simple name (without the package) of the given class or null if the class is null.
-
-
-
Method Detail
-
name
public static java.lang.String name(java.lang.Class<?> c)
Gets the name of the given class or null if the class is null.- Parameters:
c- The class- Returns:
- The class name
-
simpleName
public static java.lang.String simpleName(java.lang.Class<?> c)
Gets the simple name (without the package) of the given class or null if the class is null.- Parameters:
c- The class- Returns:
- The class simple name
-
relativeClass
public static java.lang.Class<?> relativeClass(java.lang.Class<?> scope, java.lang.String path) throws java.lang.ClassNotFoundExceptionTakes a Class and a relative path to a class and returns any class at that relative path. For example, if the given Class was java.lang.System and the relative path was "../util/List", then the java.util.List class would be returned.- Parameters:
scope- The package to start atpath- The relative path to the class- Returns:
- The class
- Throws:
java.lang.ClassNotFoundException
-
-