Package gw.util
Class GosuClassUtil
java.lang.Object
gw.util.GosuClassUtil
This class is in part derived from org.apache.commons.lang.ClassUtils and is intended
to break a dependency on that project.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetAllInterfacesImpl
(Class c, HashSet<Class> hashSet) 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 aClass
.static String
getShortClassName
(String className) Gets the class name minus the package name from a String.
-
Constructor Details
-
GosuClassUtil
public GosuClassUtil()
-
-
Method Details
-
getNameNoPackage
-
getPackage
-
getFileExtension
-
getFileExtension
-
getShortClassName
Gets the class name minus the package name from a
Class
.- Parameters:
cls
- the class to get the short name for.- Returns:
- the class name without the package name or an empty string
-
getShortClassName
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.
- Parameters:
className
- the className to get the short name for- Returns:
- the class name of the class without the package name or an empty string
-
getAllInterfaces
-
getAllInterfacesImpl
-