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.

  • Field Details

    • code

      public Code code
      The plan of the previous command.
    • out

      public List<String> out
      The output lines of the previous command.
    • map

      public final Map<Prop,Object> map
      Property values.
    • file

      public final Supplier<File> file
      File system.

      Wrapped in a Supplier to avoid the cost of initializing it (scanning a directory) for every session.

    • shell

      private Session.Shell shell
      Implementation of "use".
  • Constructor Details

    • Session

      public Session(Map<Prop,Object> map)
      Creates a Session.

      The map parameter, that becomes the property map, is used as is, not copied. It may be immutable if the session is for a narrow, internal use. Otherwise, it should probably be a LinkedHashMap to provide deterministic iteration order.

      Parameters:
      map - Map that contains property values
  • Method Details