Package joptsimple.internal
Class Classes
- java.lang.Object
-
- joptsimple.internal.Classes
-
public final class Classes extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description private static java.util.Map<java.lang.Class<?>,java.lang.Class<?>>
WRAPPERS
-
Constructor Summary
Constructors Modifier Constructor Description private
Classes()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.String
shortNameOf(java.lang.String className)
Gives the "short version" of the given class name.static <T> java.lang.Class<T>
wrapperOf(java.lang.Class<T> clazz)
Gives the primitive wrapper class for the given class.
-
-
-
Method Detail
-
shortNameOf
public static java.lang.String shortNameOf(java.lang.String className)
Gives the "short version" of the given class name. Somewhat naive to inner classes.- Parameters:
className
- class name to chew on- Returns:
- the short name of the class
-
wrapperOf
public static <T> java.lang.Class<T> wrapperOf(java.lang.Class<T> clazz)
Gives the primitive wrapper class for the given class. If the given class is not primitive, returns the class itself.- Type Parameters:
T
- generic class type- Parameters:
clazz
- the class to check- Returns:
- primitive wrapper type if
clazz
is primitive, otherwiseclazz
-
-