Package net.hydromatic.morel.eval
Class Session
- java.lang.Object
-
- net.hydromatic.morel.eval.Session
-
public class Session extends Object
Session environment.Accessible from
EvalEnv.getOpt(String)via the hidden "$session" variable.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceSession.ShellCallback to implement "use" command.private static classSession.ShellsVarious implementations ofSession.Shell.
-
Constructor Summary
Constructors Constructor Description Session()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidhandle(MorelException e, StringBuilder buf)voiduse(String fileName, Pos pos)voidwithoutHandlingExceptions(Consumer<Session> consumer)Calls some code with aSession.Shellthat does not handle errors.voidwithShell(Session.Shell shell, Consumer<String> outLines, Consumer<Session> consumer)Calls some code with a new value ofSession.Shell.
-
-
-
Method Detail
-
withShell
public void withShell(Session.Shell shell, Consumer<String> outLines, Consumer<Session> consumer)
Calls some code with a new value ofSession.Shell.
-
withoutHandlingExceptions
public void withoutHandlingExceptions(Consumer<Session> consumer)
Calls some code with aSession.Shellthat does not handle errors.
-
handle
public void handle(MorelException e, StringBuilder buf)
-
-