- Timestamp:
- 08/02/19 14:47:33 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/java-utils/src/main/java/de/ugoe/cs/util/console/CommandExecuter.java
r2282 r2283 246 246 String className = classFile.getName() 247 247 .substring(0, classFile.getName().lastIndexOf('.')); 248 248 249 Class<?> clazz = 249 250 loader.loadClass(commandPackage.getPackageName() + "." + 250 251 className); 251 if (Command.class.isAssignableFrom(clazz)) { 252 253 if (Command.class.isAssignableFrom(clazz) && 254 clazz.getSimpleName().startsWith(cmdPrefix)) 255 { 252 256 commands.add((Command) clazz.getConstructor().newInstance()); 253 257 } … … 277 281 .substring(path.length() + 1, 278 282 entry.getName().lastIndexOf('.')); 283 279 284 Class<?> clazz = 280 285 loader.loadClass(commandPackage.getPackageName() + 281 286 "." + className); 282 287 283 Console.traceln(Level.WARNING, clazz.getName()); 284 if (Command.class.isAssignableFrom(clazz)) { 288 if (Command.class.isAssignableFrom(clazz) && 289 clazz.getSimpleName().startsWith(cmdPrefix)) 290 { 285 291 commands.add((Command) clazz.getConstructor().newInstance()); 286 292 }
Note: See TracChangeset
for help on using the changeset viewer.