net.sourceforge.pmd.util

Class ClassUtil

public class ClassUtil extends Object

Various class-related utility methods

Author: Brian Remedios

Method Summary
static ClassgetPrimitiveTypeFor(String name)
Returns the type(class) for the name specified or null if not found.
static ClassgetTypeFor(String shortName)
Attempt to determine the actual class given the short name.
static StringwithoutPackageName(String fullTypeName)
Returns the abbreviated name of the type, without the package name

Method Detail

getPrimitiveTypeFor

public static Class getPrimitiveTypeFor(String name)
Returns the type(class) for the name specified or null if not found.

Parameters: name String

Returns: Class

getTypeFor

public static Class getTypeFor(String shortName)
Attempt to determine the actual class given the short name.

Parameters: shortName String

Returns: Class

withoutPackageName

public static String withoutPackageName(String fullTypeName)
Returns the abbreviated name of the type, without the package name

Parameters: fullTypeName

Returns: String