Changeset 532 for trunk/quest-plugin-core
- Timestamp:
- 08/07/12 16:05:48 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/quest-plugin-core/src/main/java/de/ugoe/cs/quest/plugin/PluginLoader.java
r511 r532 13 13 import java.security.InvalidParameterException; 14 14 import java.util.Collection; 15 import java.util.Collections; 15 16 import java.util.LinkedList; 16 17 import java.util.jar.JarInputStream; … … 97 98 + "' found in " + pluginDir + "/" + jarFile.getName()); 98 99 } 99 if (!pluginClass.isInstance(QuestPlugin.class)) {100 throw new PluginLoaderException("Class " + pluginClassName101 + " not instance of QuestPlugin");102 }103 100 try { 104 101 QuestPlugin pluginObject = (QuestPlugin) pluginClass … … 111 108 throw new PluginLoaderException("Could not access " 112 109 + pluginClassName); 110 } catch (ClassCastException e) { 111 throw new PluginLoaderException("Class " + pluginClassName 112 + " not instance of QuestPlugin"); 113 113 } 114 114 } … … 232 232 && filename.endsWith(".jar") && filename.split("-").length == 4; 233 233 } 234 235 public Collection<QuestPlugin> getPlugins() { 236 return Collections.unmodifiableCollection(plugins); 237 } 234 238 }
Note: See TracChangeset
for help on using the changeset viewer.