Class TypeNames


  • public class TypeNames
    extends Object
    TypeNames provides a pair of static methods to:
    • get string names for classes and primitive types, and
    • get the Class object for a string representing a class or primitive type.
    • Constructor Detail

      • TypeNames

        public TypeNames()
    • Method Detail

      • getTypeForName

        public static Class<?> getTypeForName​(@ClassGetName String typeName)
                                       throws ClassNotFoundException
        Returns Class object for a fully-qualified class name or primitive type name.
        Parameters:
        typeName - a fully-qualified class name or primitive type name
        Returns:
        Class object for type given in string
        Throws:
        ClassNotFoundException - if string is not a recognized type