public class TypeWriterHelper
extends java.lang.Object
| Constructor and Description |
|---|
TypeWriterHelper() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
getClassName(java.lang.Class c)
get the name without the package from the class
|
static java.lang.String |
getClassName(java.lang.String s)
get the name without the package from the String representing a class
|
static java.lang.String |
getModifiers(int modifiers)
get a String representation for the sum of modifiers as
defined in
java.lang.reflect.Modifier
supports:
private
public
protected
final
static
|
static java.lang.String |
makeString(java.lang.String value)
make a String between quotes from the supplied String
|
static java.lang.String |
spaces(int length)
create a String of length length filled with spaces
|
public static final java.lang.String getClassName(java.lang.Class c)
c - Class, the class for which to retrieve the namenull if class is nullpublic static final java.lang.String getClassName(java.lang.String s)
s - String, the String representing a class for which to retrieve the name.
If no package is supplied the return value is same as the value offerednull if String is null, or String is emptypublic static java.lang.String getModifiers(int modifiers)
java.lang.reflect.Modifier
modifiers - int, sum of Modifier values from java.lang.reflect.Modifierpublic static java.lang.String makeString(java.lang.String value)
value - String, the value to make a String fornull
if the value is null or emptypublic static final java.lang.String spaces(int length)
There is a faster way to do this, by using a static char array to read from, but it is only slightly faster and consumes extra memory and more lines of code
length - int, the length of the String of spaces