public class ManClassUtil extends Object
Constructor and Description |
---|
ManClassUtil() |
Modifier and Type | Method and Description |
---|---|
static Class<?> |
box(Class<?> type) |
static Set<Class> |
getAllInterfaces(Class c) |
static String |
getFileExtension(File file) |
static String |
getFileExtension(String name) |
static String |
getNameNoPackage(String className) |
static String |
getPackage(String className) |
static String |
getShortClassName(Class cls)
Gets the class name minus the package name from a
Class . |
static String |
getShortClassName(String className)
Gets the class name minus the package name from a String.
|
static boolean |
isJavaIdentifier(String part) |
static boolean |
isValidClassName(String name) |
public static String getShortClassName(Class cls)
Gets the class name minus the package name from a Class
.
cls
- the class to get the short name for.public static String getShortClassName(String className)
Gets the class name minus the package name from a String.
The string passed in is assumed to be a class name - it is not checked.
className
- the className to get the short name forpublic static boolean isJavaIdentifier(String part)
public static boolean isValidClassName(String name)
Copyright © 2024. All rights reserved.