|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.mockrunner.util.common.ClassUtil
Constructor Summary | |
ClassUtil()
|
Method Summary | |
static java.lang.String |
getArgumentName(java.lang.Class argumentType)
Returns a suitable argument name for arguments of type argumentType . |
static java.lang.String |
getClassName(java.lang.Class clazz)
Returns the name of the specified class. |
static java.lang.String |
getPackageName(java.lang.Class clazz)
Returns the name of the package of the specified class. |
static boolean |
isKeyword(java.lang.String name)
Returns if the specified string is a Java language keyword. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ClassUtil()
Method Detail |
public static java.lang.String getPackageName(java.lang.Class clazz)
clazz
- the Class
public static java.lang.String getClassName(java.lang.Class clazz)
[]
will be
appended to the name (once for each dimension).
clazz
- the Class
public static boolean isKeyword(java.lang.String name)
name
- the string
true
if it is a keyword,
false
otherwisepublic static java.lang.String getArgumentName(java.lang.Class argumentType)
argumentType
. Simply takes
the class name and converts the starting characters
to lower case (by preserving one upper case character).
E.g. the result of JMSTestModule
is
jmsTestModule
.
If the specified argumentType
is an array,
an "s"
is appended to the string.
If the resulting string is a Java keyword, "Value"
is appended to the string (what is always the case with
primitive types).
argumentType
- the argument type
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |