private CommandResolution resolveCommand(org.crsh.lang.spi.Compiler manager, String name, Resource script) throws CommandException { TimestampedObject<CommandResolution> ref = commandCache.get(name); if (ref != null) { if (script.getTimestamp() != ref.getTimestamp()) { ref = null; } } CommandResolution command; if (ref == null) { command = manager.compileCommand(name, script.getContent()); if (command != null) { commandCache.put(name, new TimestampedObject<CommandResolution>(script.getTimestamp(), command)); } } else { command = ref.getObject(); } return command; }
providerRef = new TimestampedObject<Class<? extends T>>(script.getTimestamp(), clazz); saveClass(name, providerRef);
private CommandResolution resolveCommand(org.crsh.lang.spi.Compiler manager, String name, Resource script) throws CommandException { TimestampedObject<CommandResolution> ref = commandCache.get(name); if (ref != null) { if (script.getTimestamp() != ref.getTimestamp()) { ref = null; } } CommandResolution command; if (ref == null) { command = manager.compileCommand(name, script.getContent()); if (command != null) { commandCache.put(name, new TimestampedObject<CommandResolution>(script.getTimestamp(), command)); } } else { command = ref.getObject(); } return command; }
private CommandResolution resolveCommand(org.crsh.lang.spi.Compiler manager, String name, Resource script) throws CommandException { TimestampedObject<CommandResolution> ref = commandCache.get(name); if (ref != null) { if (script.getTimestamp() != ref.getTimestamp()) { ref = null; } } CommandResolution command; if (ref == null) { command = manager.compileCommand(name, script.getContent()); if (command != null) { commandCache.put(name, new TimestampedObject<CommandResolution>(script.getTimestamp(), command)); } } else { command = ref.getObject(); } return command; }
providerRef = new TimestampedObject<Class<? extends T>>(script.getTimestamp(), clazz); saveClass(name, providerRef);
providerRef = new TimestampedObject<Class<? extends T>>(script.getTimestamp(), clazz); saveClass(name, providerRef);
providerRef = new TimestampedObject<Class<? extends T>>(script.getTimestamp(), providerClass); saveClass(name, providerRef); } else {