public static Class < ? extends VehicleInterface > findClass ( String interfaceName ) throws VehicleInterfaceException { Class < ? extends VehicleInterface > interfaceType ; try { interfaceType = Class . forName ( interfaceName ) . asSubclass ( VehicleInterface . class ) ; } catch ( ClassNotFoundException e ) { throw new VehicleInterfaceException ( "Couldn't find vehicle interface type " + interfaceName , e ) ; } return interfaceType ; }
Obtain the Class object for a given VehicleInterface class name .