private List < Class < ? > > loadServiceClasses ( ClassLoader loader ) throws MojoExecutionException { List < Class < ? > > serviceClasses = new ArrayList < Class < ? > > ( ) ; for ( String serviceClassName : getServices ( ) ) { try { Class < ? > serviceClass = loader . loadClass ( serviceClassName ) ; serviceClasses . add ( serviceClass ) ; } catch ( ClassNotFoundException ex ) { throw new MojoExecutionException ( "Could not load class: " + serviceClassName , ex ) ; } } return serviceClasses ; }
Loads all interfaces using the provided ClassLoader