protected < T > T createInstance ( String typeName ) throws PluginRepositoryException { Class < T > type = getType ( typeName . trim ( ) ) ; try { return type . newInstance ( ) ; } catch ( InstantiationException e ) { throw new PluginRepositoryException ( "Cannot create instance of class " + type . getName ( ) , e ) ; } catch ( IllegalAccessException e ) { throw new PluginRepositoryException ( "Cannot access class " + typeName , e ) ; } catch ( LinkageError e ) { throw new PluginRepositoryException ( "Cannot load plugin class " + typeName , e ) ; } }
Create an instance of the given scanner plugin class .