@Test public void isOpenTest() { InterpreterResult interpreterResult = new InterpreterResult(InterpreterResult.Code.SUCCESS, ""); when(interpreter.interpret(any(String.class), any(InterpreterContext.class))).thenReturn(interpreterResult); LazyOpenInterpreter lazyOpenInterpreter = new LazyOpenInterpreter(interpreter); assertFalse("Interpreter is not open", lazyOpenInterpreter.isOpen()); InterpreterContext interpreterContext = new InterpreterContext("note", "id", null, "title", "text", null, null, null, null, null, null, null); lazyOpenInterpreter.interpret("intp 1", interpreterContext); assertTrue("Interpeter is open", lazyOpenInterpreter.isOpen()); }
public boolean isOpen() { synchronized (intp) { return opened; } }
LazyOpenInterpreter extends Interpreter implements WrappedInterpreter { public boolean isOpen() { synchronized (intp) { return opened; } } }
LazyOpenInterpreter extends Interpreter implements WrappedInterpreter { public boolean isOpen() { synchronized (intp) { return opened; } } LazyOpenInterpreter(Interpreter intp); }
LazyOpenInterpreter extends Interpreter implements WrappedInterpreter { public boolean isOpen() { synchronized (intp) { return opened; } } LazyOpenInterpreter(Interpreter intp); @Override Interpreter getInnerInterpreter(); @Override void setProperty(Properties property); @Override Properties getProperty(); @Override String getProperty(String key); @Override synchronized void open(); @Override void close(); boolean isOpen(); @Override InterpreterResult interpret(String st, InterpreterContext context); @Override void cancel(InterpreterContext context); @Override FormType getFormType(); @Override int getProgress(InterpreterContext context); @Override Scheduler getScheduler(); @Override List<InterpreterCompletion> completion(String buf, int cursor); @Override String getClassName(); @Override InterpreterGroup getInterpreterGroup(); @Override void setInterpreterGroup(InterpreterGroup interpreterGroup); @Override URL [] getClassloaderUrls(); @Override void setClassloaderUrls(URL [] urls); @Override void registerHook(String noteId, String event, String cmd); @Override void registerHook(String event, String cmd); @Override String getHook(String noteId, String event); @Override String getHook(String event); @Override void unregisterHook(String noteId, String event); @Override void unregisterHook(String event); }
LazyOpenInterpreter extends Interpreter implements WrappedInterpreter { public boolean isOpen() { synchronized (intp) { return opened; } } LazyOpenInterpreter(Interpreter intp); @Override Interpreter getInnerInterpreter(); @Override void setProperty(Properties property); @Override Properties getProperty(); @Override String getProperty(String key); @Override synchronized void open(); @Override void close(); boolean isOpen(); @Override InterpreterResult interpret(String st, InterpreterContext context); @Override void cancel(InterpreterContext context); @Override FormType getFormType(); @Override int getProgress(InterpreterContext context); @Override Scheduler getScheduler(); @Override List<InterpreterCompletion> completion(String buf, int cursor); @Override String getClassName(); @Override InterpreterGroup getInterpreterGroup(); @Override void setInterpreterGroup(InterpreterGroup interpreterGroup); @Override URL [] getClassloaderUrls(); @Override void setClassloaderUrls(URL [] urls); @Override void registerHook(String noteId, String event, String cmd); @Override void registerHook(String event, String cmd); @Override String getHook(String noteId, String event); @Override String getHook(String event); @Override void unregisterHook(String noteId, String event); @Override void unregisterHook(String event);  }